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

Don't require alias in public room list. #664

Merged
merged 6 commits into from Mar 23, 2016

Conversation

Projects
None yet
3 participants
Owner

erikjohnston commented Mar 23, 2016

Rooms now no longer require an alias to be published.

Also, changes the way we pull out state of each room to not require fetching all state events.

Don't require alias in public room list.
Rooms now no longer require an alias to be published.

Also, changes the way we pull out state of each room to not require
fetching all state events.

@oddvar oddvar added the in progress label Mar 23, 2016

@NegativeMjark NegativeMjark commented on an outdated diff Mar 23, 2016

synapse/handlers/room.py
- name_event = state.get((EventTypes.Name, ""), None)
+ name_event = yield get_state(EventTypes.Name, "")
@NegativeMjark

NegativeMjark Mar 23, 2016

Contributor

I guess this is so we don't have to pull in the entire room state for each room? Might be worth adding a comment explaining why we've pick this particular performance trade off.

@NegativeMjark NegativeMjark and 1 other commented on an outdated diff Mar 23, 2016

synapse/handlers/room.py
- result = {"aliases": aliases, "room_id": room_id}
+ result = {"room_id": room_id}
+ if aliases:
+ result["aliases"] = aliases
@NegativeMjark

NegativeMjark Mar 23, 2016

Contributor

I wonder if we should give an empty list rather than omit the key.

@erikjohnston

erikjohnston Mar 23, 2016

Owner

Hmm, yeah, maybe. I just copied how the other keys worked (i.e. omitting the key)

Owner

erikjohnston commented Mar 23, 2016

retest this please

erikjohnston added some commits Mar 23, 2016

Owner

erikjohnston commented Mar 23, 2016

@NegativeMjark PTAL

I'm afraid I added some SQL and a check for JoinRules = Public

Contributor

NegativeMjark commented Mar 23, 2016

LGTM

@erikjohnston erikjohnston merged commit fbdeb17 into develop Mar 23, 2016

8 checks passed

Flake8 + Packaging (Commit) Build #199 origin/erikj/public_room_list succeeded in 28 sec
Details
Flake8 + Packaging (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #202 origin/erikj/public_room_list succeeded in 5 min 18 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #203 origin/erikj/public_room_list succeeded in 4 min 39 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
Unit Tests (Commit) Build #244 origin/erikj/public_room_list succeeded in 1 min 15 sec
Details
Unit Tests (Merged PR) Build finished.
Details

@oddvar oddvar removed the in progress label Mar 23, 2016

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