mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:36:02 -04:00
Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy (#3307)
This commit is contained in:
parent
872cf43516
commit
c936a52a9e
29 changed files with 116 additions and 101 deletions
|
@ -229,7 +229,8 @@ class Mailer(object):
|
|||
if room_vars['notifs'] and 'messages' in room_vars['notifs'][-1]:
|
||||
prev_messages = room_vars['notifs'][-1]['messages']
|
||||
for message in notifvars['messages']:
|
||||
pm = filter(lambda pm: pm['id'] == message['id'], prev_messages)
|
||||
pm = list(filter(lambda pm: pm['id'] == message['id'],
|
||||
prev_messages))
|
||||
if pm:
|
||||
if not message["is_historical"]:
|
||||
pm[0]["is_historical"] = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue