summary refs log tree commit diff
path: root/synapse/handlers/profile.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-05-12 16:37:50 +0100
committerMark Haines <mark.haines@matrix.org>2015-05-12 16:37:50 +0100
commitcffe6057fb59a4db622132a84b5ef88cf81f6bfd (patch)
tree173ebcd9a8c7c04ee3a4f733995a47c515e9c81a /synapse/handlers/profile.py
parentMerge branch 'notifier_unify' into notifier_performance (diff)
parentMerge branch 'develop' into notifier_unify (diff)
downloadsynapse-cffe6057fb59a4db622132a84b5ef88cf81f6bfd.tar.xz
Merge branch 'notifier_unify' into notifier_performance
Conflicts:
	synapse/notifier.py
Diffstat (limited to 'synapse/handlers/profile.py')
-rw-r--r--synapse/handlers/profile.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py
index ee2732b848..71ff78ab23 100644
--- a/synapse/handlers/profile.py
+++ b/synapse/handlers/profile.py
@@ -17,8 +17,8 @@ from twisted.internet import defer
 
 from synapse.api.errors import SynapseError, AuthError, CodeMessageException
 from synapse.api.constants import EventTypes, Membership
-from synapse.util.logcontext import PreserveLoggingContext
 from synapse.types import UserID
+from synapse.util import unwrapFirstError
 
 from ._base import BaseHandler
 
@@ -154,14 +154,13 @@ class ProfileHandler(BaseHandler):
         if not self.hs.is_mine(user):
             defer.returnValue(None)
 
-        with PreserveLoggingContext():
-            (displayname, avatar_url) = yield defer.gatherResults(
-                [
-                    self.store.get_profile_displayname(user.localpart),
-                    self.store.get_profile_avatar_url(user.localpart),
-                ],
-                consumeErrors=True
-            )
+        (displayname, avatar_url) = yield defer.gatherResults(
+            [
+                self.store.get_profile_displayname(user.localpart),
+                self.store.get_profile_avatar_url(user.localpart),
+            ],
+            consumeErrors=True
+        ).addErrback(unwrapFirstError)
 
         state["displayname"] = displayname
         state["avatar_url"] = avatar_url