Skip to content
Snippets Groups Projects
Commit b0bb1756 authored by Paul "LeoNerd" Evans's avatar Paul "LeoNerd" Evans
Browse files

Send list of typing user IDs as 'user_ids' list within 'content', so that...

Send list of typing user IDs as 'user_ids' list within 'content', so that m.typing stream events have a toplevel content, for consistency with others
parent 0b700233
No related branches found
No related tags found
No related merge requests found
......@@ -223,7 +223,9 @@ class TypingNotificationEventSource(object):
return {
"type": "m.typing",
"room_id": room_id,
"typing": [u.to_string() for u in typing],
"content": {
"user_ids": [u.to_string() for u in typing],
},
}
def get_new_events_for_user(self, user, from_key, limit):
......
......@@ -182,7 +182,9 @@ class TypingNotificationsTestCase(unittest.TestCase):
[
{"type": "m.typing",
"room_id": self.room_id,
"typing": [self.u_apple.to_string()]},
"content": {
"user_ids": [self.u_apple.to_string()],
}},
]
)
......@@ -242,7 +244,9 @@ class TypingNotificationsTestCase(unittest.TestCase):
[
{"type": "m.typing",
"room_id": self.room_id,
"typing": [self.u_onion.to_string()]},
"content": {
"user_ids": [self.u_onion.to_string()],
}},
]
)
......@@ -295,7 +299,9 @@ class TypingNotificationsTestCase(unittest.TestCase):
[
{"type": "m.typing",
"room_id": self.room_id,
"typing": []},
"content": {
"user_ids": [],
}},
]
)
......@@ -323,7 +329,9 @@ class TypingNotificationsTestCase(unittest.TestCase):
[
{"type": "m.typing",
"room_id": self.room_id,
"typing": [self.u_apple.to_string()]},
"content": {
"user_ids": [self.u_apple.to_string()],
}},
]
)
......@@ -339,6 +347,8 @@ class TypingNotificationsTestCase(unittest.TestCase):
[
{"type": "m.typing",
"room_id": self.room_id,
"typing": []},
"content": {
"user_ids": [],
}},
]
)
......@@ -100,7 +100,9 @@ class RoomTypingTestCase(RestTestCase):
[
{"type": "m.typing",
"room_id": self.room_id,
"typing": [self.user_id]},
"content": {
"user_ids": [self.user_id],
}},
]
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment