remove newline character from event.body
This commit is contained in:
parent
4c9ec31102
commit
a343deecb1
1 changed files with 2 additions and 0 deletions
2
bot.py
2
bot.py
|
@ -43,6 +43,8 @@ class Bot:
|
|||
|
||||
# message_callback event
|
||||
async def message_callback(self, room: MatrixRoom, event: RoomMessageText) -> None:
|
||||
# remove newline character from event.body
|
||||
event.body = re.sub("\r\n|\r|\n", " ", event.body)
|
||||
if self.room_id == '':
|
||||
room_id = room.room_id
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue