Support stickers
This commit is contained in:
parent
92f6a250f1
commit
b133ebef69
@ -53,6 +53,11 @@ class MImageContent(MessageContentBase):
|
||||
file: Optional[EncryptedFile] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class MStickerContent(MImageContent):
|
||||
msgtype = 'm.sticker'
|
||||
|
||||
|
||||
@dataclass
|
||||
class MFileContent(MessageContentBase):
|
||||
msgtype = "m.file"
|
||||
@ -193,6 +198,7 @@ content_dispatcher = {
|
||||
"m.emote": MEmoteContent,
|
||||
"m.notice": MNoticeContent,
|
||||
"m.image": MImageContent,
|
||||
"m.sticker": MStickerContent,
|
||||
"m.file": MFileContent,
|
||||
"m.location": MLocationContent,
|
||||
"m.video": MVideoContent,
|
||||
|
||||
@ -29,6 +29,8 @@ class EventBase:
|
||||
content_dict = {'options': event_dict['content']}
|
||||
else:
|
||||
content_dict = event_dict['content']
|
||||
if event_dict['type'] == 'm.sticker':
|
||||
content_dict['msgtype'] = 'm.sticker'
|
||||
|
||||
if content_dict.get('m.relates_to'):
|
||||
if content_dict['m.relates_to'].get('m.in_reply_to'):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user