mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 16:54:56 -04:00
An initial hack at storing presence state-change mtimes in database and presenting age durations to clients/federation events
This commit is contained in:
parent
a6a9b71da0
commit
d05aa651f8
7 changed files with 101 additions and 29 deletions
|
@ -234,7 +234,11 @@ class PresenceEventStreamTestCase(unittest.TestCase):
|
|||
# I'll already get my own presence state change
|
||||
self.assertEquals({"start": "0", "end": "1", "chunk": [
|
||||
{"type": "m.presence",
|
||||
"content": {"user_id": "@apple:test", "state": ONLINE}},
|
||||
"content": {
|
||||
"user_id": "@apple:test",
|
||||
"state": ONLINE,
|
||||
"mtime_age": 0,
|
||||
}},
|
||||
]}, response)
|
||||
|
||||
self.mock_datastore.set_presence_state.return_value = defer.succeed(
|
||||
|
@ -251,5 +255,9 @@ class PresenceEventStreamTestCase(unittest.TestCase):
|
|||
self.assertEquals(200, code)
|
||||
self.assertEquals({"start": "1", "end": "2", "chunk": [
|
||||
{"type": "m.presence",
|
||||
"content": {"user_id": "@banana:test", "state": ONLINE}},
|
||||
"content": {
|
||||
"user_id": "@banana:test",
|
||||
"state": ONLINE,
|
||||
"mtime_age": 0,
|
||||
}},
|
||||
]}, response)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue