Commit Graph

7 Commits

Author SHA1 Message Date
Richard van der Hoff
daa1ac89a0
Fix device list update stream ids going backward ()
Occasionally we could get a federation device list update transaction which
looked like:

```
[
    {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D2', 'prev_id': [], 'stream_id': 12, 'deleted': True}},
    {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D1', 'prev_id': [12], 'stream_id': 11, 'deleted': True}},
    {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D3', 'prev_id': [11], 'stream_id': 13, 'deleted': True}}
]
```

Having `stream_ids` which are lower than `prev_ids` looks odd. It might work
(I'm not actually sure), but in any case it doesn't seem like a reasonable
thing to expect other implementations to support.
2020-04-03 10:40:22 +01:00
Richard van der Hoff
7966a1cde9
Rewrite prune_old_outbound_device_pokes for efficiency ()
make sure we clear out all but one update for the user
2020-03-30 19:06:52 +01:00
Richard van der Hoff
665630fcaa Add tests for outbound device pokes 2020-03-27 12:01:37 +00:00
Amber Brown
0f87b912ab
Implementation of MSC2314 () 2019-11-28 08:54:07 +11:00
Amber Brown
32e7c9e7f2
Run Black. () 2019-06-20 19:32:02 +10:00
Amber Brown
b36c82576e
Run Black on the tests again () 2019-05-10 00:12:11 -05:00
Richard van der Hoff
a902d13180
Batch up outgoing read-receipts to reduce federation traffic. ()
Rate-limit outgoing read-receipts as per .
2019-03-20 16:02:25 +00:00