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 group summary APIs #2363

Merged
merged 11 commits into from Jul 17, 2017

Conversation

Projects
None yet
2 participants
Owner

erikjohnston commented Jul 12, 2017

No description provided.

erikjohnston added some commits Jul 10, 2017

synapse/storage/group_server.py
+ txn.execute("""
+ INSERT INTO group_summary_roles
+ (group_id, role_id, role_order)
+ SELECT ?, ?, COALESCE(MAX(role_order), 1)
@NegativeMjark

NegativeMjark Jul 14, 2017

Contributor

Will this be larger than all the others, or the same as the largest?

synapse/storage/group_server.py
from ._base import SQLBaseStore
import ujson as json
+# The category ID for the "default" category. We don't store as null in the
+# database to avoid the fun of null != null
+_DEFAULT_CATEGORY_ID = "default"
@NegativeMjark

NegativeMjark Jul 14, 2017

Contributor

Maybe use the empty string as the default ID here?

+ )
+
+ @defer.inlineCallbacks
+ def on_POST(self, origin, content, query, group_id, category_id, room_id):
@NegativeMjark

NegativeMjark Jul 14, 2017

Contributor

Maybe check that the category is not the default ID.

erikjohnston added some commits Jul 14, 2017

@erikjohnston erikjohnston merged commit b3de672 into erikj/groups_merged Jul 17, 2017

6 of 8 checks passed

Sytest Dendron (Commit) Build #2469 origin/erikj/group_server_summary failed in 9 min 57 sec
Details
Sytest Dendron (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #3304 origin/erikj/group_server_summary succeeded in 9 min 22 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #3397 origin/erikj/group_server_summary succeeded in 1 min 36 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

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

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