mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:54:47 -04:00
untested WIP but might actually work
This commit is contained in:
parent
47d99a20d5
commit
3241c7aac3
6 changed files with 96 additions and 20 deletions
|
@ -15,6 +15,8 @@
|
|||
|
||||
from twisted.internet import defer
|
||||
|
||||
from synapse.storage.roommember import ProfileInfo
|
||||
|
||||
from ._base import SQLBaseStore
|
||||
|
||||
|
||||
|
@ -26,6 +28,18 @@ class ProfileStore(SQLBaseStore):
|
|||
desc="create_profile",
|
||||
)
|
||||
|
||||
def get_profileinfo(self, user_localpart):
|
||||
profile = self._simple_select_one(
|
||||
table="profiles",
|
||||
keyvalues={"user_id": user_localpart},
|
||||
retcols=("displayname", "avatar_url"),
|
||||
desc="get_profileinfo",
|
||||
)
|
||||
return ProfileInfo(
|
||||
avatar_url=profile.avatar_url,
|
||||
displayname=profile.displayname,
|
||||
)
|
||||
|
||||
def get_profile_displayname(self, user_localpart):
|
||||
return self._simple_select_one_onecol(
|
||||
table="profiles",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue