summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/handlers/typing.py4
-rw-r--r--tests/handlers/test_typing.py20
-rw-r--r--tests/rest/test_typing.py4
3 files changed, 21 insertions, 7 deletions
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py
index 46a0b299a1..253fec514d 100644
--- a/synapse/handlers/typing.py
+++ b/synapse/handlers/typing.py
@@ -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):
diff --git a/tests/handlers/test_typing.py b/tests/handlers/test_typing.py
index bc19db8dfa..391e287adc 100644
--- a/tests/handlers/test_typing.py
+++ b/tests/handlers/test_typing.py
@@ -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": [],
+                }},
             ]
         )
diff --git a/tests/rest/test_typing.py b/tests/rest/test_typing.py
index 0b95d70718..c550294d59 100644
--- a/tests/rest/test_typing.py
+++ b/tests/rest/test_typing.py
@@ -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],
+                }},
             ]
         )