mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 03:54:52 -04:00
Allow update group publicity
This commit is contained in:
parent
05e21285aa
commit
b880ff190a
2 changed files with 43 additions and 0 deletions
|
@ -835,6 +835,21 @@ class GroupServerStore(SQLBaseStore):
|
|||
desc="add_room_to_group",
|
||||
)
|
||||
|
||||
def update_group_publicity(self, group_id, user_id, publicise):
|
||||
"""Update whether the user is publicising their membership of the group
|
||||
"""
|
||||
return self._simple_update_one(
|
||||
table="local_group_membership",
|
||||
keyvalues={
|
||||
"group_id": group_id,
|
||||
"user_id": user_id,
|
||||
},
|
||||
updatevalues={
|
||||
"is_publicised": publicise,
|
||||
},
|
||||
desc="update_group_publicity"
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def register_user_group_membership(self, group_id, user_id, membership,
|
||||
is_admin=False, content={},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue