mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-25 03:35:28 +00:00
fix NPE in room ordering
This commit is contained in:
parent
d437882581
commit
cb8a321bdd
@ -135,8 +135,8 @@ class Mailer(object):
|
|||||||
yield concurrently_execute(_fetch_room_state, rooms_in_order, 3)
|
yield concurrently_execute(_fetch_room_state, rooms_in_order, 3)
|
||||||
|
|
||||||
# actually sort our so-called rooms_in_order list, most recent room first
|
# actually sort our so-called rooms_in_order list, most recent room first
|
||||||
rooms_in_order = rooms_in_order.sort(
|
rooms_in_order.sort(
|
||||||
key=lambda r: -notifs_by_room[r]['received_ts']
|
key=lambda r: -(notifs_by_room[r][-1]['received_ts'] or 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
rooms = []
|
rooms = []
|
||||||
|
Loading…
Reference in New Issue
Block a user