Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add update group profile API #2377

Merged
merged 4 commits into from Jul 20, 2017

Conversation

Projects
None yet
3 participants
Owner

erikjohnston commented Jul 20, 2017

No description provided.

synapse/storage/group_server.py
+ "group_id": group_id,
+ },
+ updatevalues=profile,
+ desc="create_group",
@NegativeMjark

NegativeMjark Jul 20, 2017

Contributor

Should the "desc" be "update_group"?

synapse/groups/groups_server.py
+ for keyname in ("name", "avatar_url", "short_description",
+ "long_description"):
+ if keyname in content:
+ profile[keyname] = content[keyname]
@NegativeMjark

NegativeMjark Jul 20, 2017

Contributor

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.

Otherwise LGTM

erikjohnston added some commits Jul 20, 2017

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):
@dbkr

dbkr Jul 20, 2017

Member

Spurious 'content' param?

dbkr approved these changes Jul 20, 2017

@erikjohnston erikjohnston merged commit 0401604 into erikj/groups_merged Jul 20, 2017

1 of 7 checks passed

Sytest Dendron (Commit) Build #2495 origin/erikj/group_profile_update in progress...
Details
Sytest Dendron (Merged PR) Build started sha1 is merged.
Details
Sytest Postgres (Merged PR) Build started sha1 is merged.
Details
Sytest SQLite (Merged PR) Build started sha1 is merged.
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
Sytest SQLite (Commit) Build #3424 origin/erikj/group_profile_update succeeded in 1 min 47 sec
Details

@erikjohnston erikjohnston deleted the erikj/group_profile_update branch Oct 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment