diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-31 19:03:47 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-31 19:03:47 +1000 |
commit | c936a52a9eb18e302fbd5158da7188f674912530 (patch) | |
tree | ce74f2a73cc4730199dfca39420a5564f36daab7 /synapse/push/mailer.py | |
parent | Merge pull request #3303 from NotAFile/py3-memoryview (diff) | |
download | synapse-c936a52a9eb18e302fbd5158da7188f674912530.tar.xz |
Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy (#3307)
Diffstat (limited to 'synapse/push/mailer.py')
-rw-r--r-- | synapse/push/mailer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py index b5cd9b426a..d4be800e5e 100644 --- a/synapse/push/mailer.py +++ b/synapse/push/mailer.py @@ -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 |