Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
aa82cb38
Commit
aa82cb38
authored
9 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Remove state hack from _create_new_client_event
parent
c906f306
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/_base.py
+0
-43
0 additions, 43 deletions
synapse/handlers/_base.py
with
0 additions
and
43 deletions
synapse/handlers/_base.py
+
0
−
43
View file @
aa82cb38
...
...
@@ -221,49 +221,6 @@ class BaseHandler(object):
context
=
yield
state_handler
.
compute_event_context
(
builder
)
# If we've received an invite over federation, there are no latest
# events in the room, because we don't know enough about the graph
# fragment we received to treat it like a graph, so the above returned
# no relevant events. It may have returned some events (if we have
# joined and left the room), but not useful ones, like the invite.
if
(
not
self
.
is_host_in_room
(
context
.
current_state
)
and
builder
.
type
==
EventTypes
.
Member
):
prev_member_event
=
yield
self
.
store
.
get_room_member
(
builder
.
sender
,
builder
.
room_id
)
# The prev_member_event may already be in context.current_state,
# despite us not being present in the room; in particular, if
# inviting user, and all other local users, have already left.
#
# In that case, we have all the information we need, and we don't
# want to drop "context" - not least because we may need to handle
# the invite locally, which will require us to have the whole
# context (not just prev_member_event) to auth it.
#
context_event_ids
=
(
e
.
event_id
for
e
in
context
.
current_state
.
values
()
)
if
(
prev_member_event
and
prev_member_event
.
event_id
not
in
context_event_ids
):
# The prev_member_event is missing from context, so it must
# have arrived over federation and is an outlier. We forcibly
# set our context to the invite we received over federation
builder
.
prev_events
=
(
prev_member_event
.
event_id
,
prev_member_event
.
prev_events
)
context
=
yield
state_handler
.
compute_event_context
(
builder
,
old_state
=
(
prev_member_event
,)
)
if
builder
.
is_state
():
builder
.
prev_state
=
yield
self
.
store
.
add_event_hashes
(
context
.
prev_state_events
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment