Bug fixes and logging

- Check if room is public when a user joins before adding to user dir
- Fix typo of field name "content.join_rules" -> "content.join_rule"
This commit is contained in:
Erik Johnston 2017-06-01 11:09:49 +01:00
parent 036362ede6
commit 0fe6f3c521
2 changed files with 22 additions and 2 deletions

View file

@ -38,7 +38,7 @@ class UserDirectoryStore(SQLBaseStore):
if join_rules_id:
join_rule_ev = yield self.get_event(join_rules_id, allow_none=True)
if join_rule_ev:
if join_rule_ev.content.get("join_rules") == JoinRules.PUBLIC:
if join_rule_ev.content.get("join_rule") == JoinRules.PUBLIC:
defer.returnValue(True)
hist_vis_id = current_state_ids.get((EventTypes.RoomHistoryVisibility, ""))