Merge pull request #112 from paul-nameless/implement-msg-types

Implement messageBasicGroupChatCreate and messageBasicGroupChatCreate msg types
This commit is contained in:
Nameless 2020-07-04 13:48:26 +08:00 committed by GitHub
commit af47b1e7c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -567,9 +567,15 @@ def parse_content(content: Dict[str, Any]) -> str:
if msg.is_text:
return content["text"]["text"]
_type = content["@type"]
if _type == "messageBasicGroupChatCreate":
return "[created the group]"
if _type == "messageChatAddMembers":
return "[joined the group]"
if not msg.content_type:
# not implemented
_type = content["@type"]
return f"[{_type}]"
fields = dict(