Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add update group profile API #2377

Merged
merged 4 commits into from
Jul 20, 2017

Conversation

erikjohnston
Copy link
Member

No description provided.

"group_id": group_id,
},
updatevalues=profile,
desc="create_group",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the "desc" be "update_group"?

for keyname in ("name", "avatar_url", "short_description",
"long_description"):
if keyname in content:
profile[keyname] = content[keyname]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe check that the values are "strings" otherwise postgresql might become sad when we try to insert them, and sqlite will probably do weird things.

Copy link
Contributor

@NegativeMjark NegativeMjark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also update the comment on GroupServlet to get/set if we're being picky

@@ -342,6 +342,25 @@ def get_group_profile(self, group_id, requester_user_id):
raise SynapseError(404, "Unknown group")

@defer.inlineCallbacks
def update_group_profile(self, group_id, requester_user_id, content):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spurious 'content' param?

@erikjohnston erikjohnston merged commit 0401604 into erikj/groups_merged Jul 20, 2017
@erikjohnston erikjohnston deleted the erikj/group_profile_update branch October 26, 2017 11:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants