summary refs log tree commit diff
path: root/synapse/util/presentable_names.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2016-05-24 14:30:51 +0100
committerDavid Baker <dbkr@users.noreply.github.com>2016-05-24 14:30:51 +0100
commitcbf8d146ac61fa748088f494147583498dd39b41 (patch)
treee6b6815162d192b3b0361257fb364ccf256d0a5c /synapse/util/presentable_names.py
parentMerge pull request #798 from negzi/bugfix_create_user_feature (diff)
parentcatch thinko in presentable names (diff)
downloadsynapse-cbf8d146ac61fa748088f494147583498dd39b41.tar.xz
Merge pull request #799 from matrix-org/matthew/quieter-email-notifs
Tune email notifs to make them quieter:
Diffstat (limited to 'synapse/util/presentable_names.py')
-rw-r--r--synapse/util/presentable_names.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/synapse/util/presentable_names.py b/synapse/util/presentable_names.py
index 3efa8a8206..a6866f6117 100644
--- a/synapse/util/presentable_names.py
+++ b/synapse/util/presentable_names.py
@@ -14,6 +14,9 @@
 # limitations under the License.
 
 import re
+import logging
+
+logger = logging.getLogger(__name__)
 
 # intentionally looser than what aliases we allow to be registered since
 # other HSes may allow aliases that we would not
@@ -105,13 +108,21 @@ def calculate_room_name(room_state, user_id, fallback_to_members=True):
             # or inbound invite, or outbound 3PID invite.
             if all_members[0].sender == user_id:
                 if "m.room.third_party_invite" in room_state_bytype:
-                    third_party_invites = room_state_bytype["m.room.third_party_invite"]
+                    third_party_invites = (
+                        room_state_bytype["m.room.third_party_invite"].values()
+                    )
+
                     if len(third_party_invites) > 0:
                         # technically third party invite events are not member
                         # events, but they are close enough
-                        return "Inviting %s" (
-                            descriptor_from_member_events(third_party_invites)
-                        )
+
+                        # FIXME: no they're not - they look nothing like a member;
+                        # they have a great big encrypted thing as their name to
+                        # prevent leaking the 3PID name...
+                        # return "Inviting %s" % (
+                        #     descriptor_from_member_events(third_party_invites)
+                        # )
+                        return "Inviting email address"
                     else:
                         return ALL_ALONE
             else: