summary refs log tree commit diff
path: root/synapse/storage/profile.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/profile.py')
-rw-r--r--synapse/storage/profile.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/storage/profile.py b/synapse/storage/profile.py
index a6e52cb248..047698aa13 100644
--- a/synapse/storage/profile.py
+++ b/synapse/storage/profile.py
@@ -13,6 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from twisted.internet import defer
+
 from ._base import SQLBaseStore
 
 
@@ -24,14 +26,17 @@ class ProfileStore(SQLBaseStore):
             desc="create_profile",
         )
 
+    @defer.inlineCallbacks
     def get_profile_displayname(self, user_localpart):
-        return self._simple_select_one_onecol(
+        name = yield self._simple_select_one_onecol(
             table="profiles",
             keyvalues={"user_id": user_localpart},
             retcol="displayname",
             desc="get_profile_displayname",
         )
 
+        defer.returnValue(name)
+
     def set_profile_displayname(self, user_localpart, new_displayname):
         return self._simple_update_one(
             table="profiles",