summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-06-15 07:03:36 -0400
committerGitHub <noreply@github.com>2020-06-15 07:03:36 -0400
commitbd6dc17221741d4ceae05ae769a70696ae939336 (patch)
treea1313d5dbdc0785aba2066e859b58ad90edf10fa /synapse/handlers/message.py
parentFix warnings about losing log context during UI auth. (#7688) (diff)
downloadsynapse-bd6dc17221741d4ceae05ae769a70696ae939336.tar.xz
Replace iteritems/itervalues/iterkeys with native versions. (#7692)
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 649ca1f08a..354da9a3b5 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -17,7 +17,7 @@
 import logging
 from typing import Optional, Tuple
 
-from six import iteritems, itervalues, string_types
+from six import string_types
 
 from canonicaljson import encode_canonical_json, json
 
@@ -246,7 +246,7 @@ class MessageHandler(object):
                 "avatar_url": profile.avatar_url,
                 "display_name": profile.display_name,
             }
-            for user_id, profile in iteritems(users_with_profile)
+            for user_id, profile in users_with_profile.items()
         }
 
     def maybe_schedule_expiry(self, event):
@@ -988,7 +988,7 @@ class EventCreationHandler(object):
 
                 state_to_include_ids = [
                     e_id
-                    for k, e_id in iteritems(current_state_ids)
+                    for k, e_id in current_state_ids.items()
                     if k[0] in self.room_invite_state_types
                     or k == (EventTypes.Member, event.sender)
                 ]
@@ -1002,7 +1002,7 @@ class EventCreationHandler(object):
                         "content": e.content,
                         "sender": e.sender,
                     }
-                    for e in itervalues(state_to_include)
+                    for e in state_to_include.values()
                 ]
 
                 invitee = UserID.from_string(event.state_key)