Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
remove incorrectly reintroduced method
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Aug 15, 2018
1 parent 217d5dd commit f5189b9
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,31 +82,6 @@ def get_room_data(self, user_id=None, room_id=None,

defer.returnValue(data)

@defer.inlineCallbacks
def _check_in_room_or_world_readable(self, room_id, user_id):
try:
# check_user_was_in_room will return the most recent membership
# event for the user if:
# * The user is a non-guest user, and was ever in the room
# * The user is a guest user, and has joined the room
# else it will throw.
member_event = yield self.auth.check_user_was_in_room(room_id, user_id)
defer.returnValue((member_event.membership, member_event.event_id))
return
except AuthError:
visibility = yield self.state_handler.get_current_state(
room_id, EventTypes.RoomHistoryVisibility, ""
)
if (
visibility and
visibility.content["history_visibility"] == "world_readable"
):
defer.returnValue((Membership.JOIN, None))
return
raise AuthError(
403, "Guest access not allowed", errcode=Codes.GUEST_ACCESS_FORBIDDEN
)

@defer.inlineCallbacks
def get_state_events(
self, user_id, room_id, types=None, filtered_types=None,
Expand Down

0 comments on commit f5189b9

Please sign in to comment.