Last active
June 6, 2022 12:44
-
-
Save BURG3R5/1c1acef11b352bcff570aba1e61eb721 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IN: events | |
messages: dict[str, str] = {} | |
for event in events: | |
if event["type"] == "m.room.message" and "content" in event and "body" in event["content"]: | |
messages[event["event_id"]] = event["content"]["body"] | |
# OUT: messages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment