-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add group summary APIs #2363
Add group summary APIs #2363
Conversation
98f85b7
to
03ec252
Compare
03ec252
to
8575e31
Compare
10143df
to
3b0470d
Compare
synapse/storage/group_server.py
Outdated
txn.execute(""" | ||
INSERT INTO group_summary_roles | ||
(group_id, role_id, role_order) | ||
SELECT ?, ?, COALESCE(MAX(role_order), 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this be larger than all the others, or the same as the largest?
synapse/storage/group_server.py
Outdated
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe check that the category is not the default ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(done)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.