| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* commit '49f877d32':
Filter the results of user directory searching via the spam checker (#6888)
|
|\|
| |
| |
| |
| | |
* commit '7765bf398':
Limit the number of events that can be requested when backfilling events (#6864)
|
| |
| |
| | |
Limit the maximum number of events requested when backfilling events.
|
|\|
| |
| |
| |
| | |
* commit 'b0c8bdd49':
pass room version into FederationClient.send_join (#6854)
|
| |
| |
| |
| | |
... which allows us to sanity-check the create event.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit '9bcd37146':
Update changelog
Update changelog
Update changelog
Newsfile
Simplify `room_version` handling in `FederationClient.send_invite`
Pass room version object into `FederationClient.get_pdu`
|
| |\
| | |
| | | |
pass room versions around
|
| | | |
|
| |\ \
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Synapse 1.10.0rc2 (2020-02-06)
==============================
Bugfixes
--------
- Fix an issue with cross-signing where device signatures were not sent to remote servers. ([\#6844](https://github.com/matrix-org/synapse/issues/6844))
- Fix to the unknown remote device detection which was introduced in 1.10.rc1. ([\#6848](https://github.com/matrix-org/synapse/issues/6848))
Internal Changes
----------------
- Detect unexpected sender keys on remote encrypted events and resync device lists. ([\#6850](https://github.com/matrix-org/synapse/issues/6850))
|
|\ \ \
| | |/
| |/|
| | |
| | | |
* commit 'a58860e48':
Check sender_key matches on inbound encrypted events. (#6850)
|
| | |
| | |
| | | |
If they don't then the device lists are probably out of sync.
|
|\| |
| | |
| | |
| | |
| | | |
* commit '6475382d8':
Fix detecting unknown devices from remote encrypted events. (#6848)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We were looking at the wrong event type (`m.room.encryption` vs
`m.room.encrypted`).
Also fixup the duplicate `EvenTypes` entries.
Introduced in #6776.
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* commit 'c7d6d5c69': (27 commits)
make FederationHandler.send_invite async
make FederationHandler.on_get_missing_events async
changelog
make FederationHandler.user_joined_room async
make FederationHandler._clean_room_for_join async
make FederationHandler._notify_persisted_event async
make FederationHandler.persist_events_and_notify async
make FederationHandler._make_and_verify_event async
make FederationHandler.do_remotely_reject_invite async
make FederationHandler._check_for_soft_fail async
make FederationHandler._persist_auth_tree async
make FederationHandler.do_invite_join async
make FederationHandler.on_event_auth async
make FederationHandler.on_exchange_third_party_invite_request async
make FederationHandler.construct_auth_difference async
make FederationHandler._update_context_for_auth_events async
make FederationHandler._update_auth_events_and_context_for_auth async
make FederationHandler.do_auth async
make FederationHandler._prep_event async
make FederationHandler._handle_new_event async
...
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
|\|
| |
| |
| |
| | |
* commit '7f93eb190':
pass room_version into compute_event_signature (#6807)
|
| | |
|
|\|
| |
| |
| |
| |
| |
| | |
* commit '160522e32':
newsfile
Add `get_room_version` method
s/get_room_version/get_room_version_id/
|
| |\
| | |
| | | |
Make `get_room_version` return a RoomVersion object
|
| | |
| | |
| | |
| | |
| | | |
... to make way for a forthcoming get_room_version which returns a RoomVersion
object.
|
|\| |
| | |
| | |
| | |
| | | |
* commit '7d846e870':
Fix bug with getting missing auth event during join 500'ed (#6810)
|
| |/ |
|
|\|
| |
| |
| |
| | |
* commit '46a446828':
pass room version into FederationHandler.on_invite_request (#6805)
|
| | |
|
|\|
| |
| |
| |
| | |
* commit 'b66032705':
Resync remote device list when detected as stale. (#6786)
|
| | |
|
|\|
| |
| |
| |
| | |
* commit 'e17a11066':
Detect unknown remote devices and mark cache as stale (#6776)
|
| |
| |
| |
| | |
We just mark the fact that the cache may be stale in the database for
now.
|
|\|
| |
| |
| |
| | |
* commit 'a8ce7aeb4':
Pass room version object into event_auth.check and check_redaction (#6788)
|
| |
| |
| |
| |
| |
| |
| | |
These are easier to work with than the strings and we normally have one around.
This fixes `FederationHander._persist_auth_tree` which was passing a
RoomVersion object into event_auth.check instead of a string.
|
|\|
| |
| |
| |
| | |
* commit '8df862e45':
Add `rooms.room_version` column (#6729)
|
| |
| |
| | |
This is so that we don't have to rely on pulling it out from `current_state_events` table.
|
|\|
| |
| |
| |
| | |
* commit 'd386f2f33':
Add StateMap type alias (#6715)
|
| | |
|
|\|
| |
| |
| |
| |
| | |
* commit '0ab5853ec':
Changelog
Fix conditions failing if min_depth = 0
|
| |
| |
| |
| | |
This could result in Synapse not fetching prev_events for new events in the room if it has missed some events.
|
| |\ |
|
| | | |
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'fa780e972':
Change EventContext to use the Storage class (#6564)
|
| | | |
|
|\ \ \
| | |/
| |/|
| | |
| | | |
* commit '03d3792f3':
Fix exceptions when attempting to backfill (#6576)
|
| | |
| | |
| | | |
Fixes #6575
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | | |
* commit '2284eb3a5':
Add database config class (#6513)
too many parens
|
| |\| |
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
(#6527)
* commit 'bbb75ff6e':
Exclude rejected state events when calculating state at backwards extrems (#6527)
|
| | |
| | |
| | |
| | |
| | | |
(#6527)
This fixes a weird bug where, if you were determined enough, you could end up with a rejected event forming part of the state at a backwards-extremity. Authing that backwards extrem would then lead to us trying to pull the rejected event from the db (with allow_rejected=False), which would fail with a 404.
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'ff773ff72':
Persist auth/state events at backwards extremities when we fetch them (#6526)
|
| | |
| | |
| | |
| | | |
The main point here is to make sure that the state returned by _get_state_in_room has been authed before we try to use it as state in the room.
|
| | |
| | |
| | |
| | |
| | | |
When we perform state resolution, check that all of the events involved are in
the right room.
|
|\| |
| | |
| | |
| | |
| | | |
* commit '35bbe4ca7':
Check the room_id of events when fetching room state/auth (#6524)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we request the state/auth_events to populate a backwards extremity (on
backfill or in the case of missing events in a transaction push), we should
check that the returned events are in the right room rather than blindly using
them in the room state or auth chain.
Given that _get_events_from_store_or_dest takes a room_id, it seems clear that
it should be sanity-checking the room_id of the requested events, so let's do
it there.
|
|\| |
| | |
| | |
| | |
| | | |
* commit '20d5ba16e':
Add `include_event_in_state` to _get_state_for_room (#6521)
|
| | |
| | |
| | |
| | |
| | |
| | | |
Make it return the state *after* the requested event, rather than the one
before it. This is a bit easier and requires fewer calls to
get_events_from_store_or_dest.
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'be294d6fd':
Move get_state methods into FederationHandler (#6503)
|
| | |
| | |
| | |
| | |
| | | |
This is a non-functional refactor as a precursor to some other work.
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
(#6527)
* commit '6920d8889':
Exclude rejected state events when calculating state at backwards extrems (#6527)
|
| | |
| | |
| | |
| | |
| | | |
(#6527)
This fixes a weird bug where, if you were determined enough, you could end up with a rejected event forming part of the state at a backwards-extremity. Authing that backwards extrem would then lead to us trying to pull the rejected event from the db (with allow_rejected=False), which would fail with a 404.
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'bc7de8765':
Persist auth/state events at backwards extremities when we fetch them (#6526)
|
| | |
| | |
| | | |
The main point here is to make sure that the state returned by _get_state_in_room has been authed before we try to use it as state in the room.
|
|\| |
| | |
| | |
| | |
| | | |
* commit '1da15f05f':
sanity-checking for events used in state res (#6531)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we perform state resolution, check that all of the events involved are in
the right room.
|
|\| |
| | |
| | |
| | |
| | | |
* commit '25f124432':
Check the room_id of events when fetching room state/auth (#6524)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we request the state/auth_events to populate a backwards extremity (on
backfill or in the case of missing events in a transaction push), we should
check that the returned events are in the right room rather than blindly using
them in the room state or auth chain.
Given that _get_events_from_store_or_dest takes a room_id, it seems clear that
it should be sanity-checking the room_id of the requested events, so let's do
it there.
|
|\| |
| | |
| | |
| | |
| | | |
* commit '204535651':
Add `include_event_in_state` to _get_state_for_room (#6521)
|
| | |
| | |
| | |
| | |
| | | |
Make it return the state *after* the requested event, rather than the one
before it. This is a bit easier and requires fewer calls to
get_events_from_store_or_dest.
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* commit '894d2adda':
changelog
convert to async: FederationHandler._process_received_pdu
convert to async: FederationHandler._get_state_for_room
convert to async: FederationHandler.on_receive_pdu
Convert federation backfill to async
|
| | |
| | |
| | |
| | | |
also fix user_joined_room to consistently return deferreds
|
| | |
| | |
| | |
| | | |
... and _get_events_from_store_or_dest
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
and associated functions:
* on_receive_pdu
* handle_queued_pdus
* get_missing_events_for_pdu
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
PaginationHandler.get_messages is only called by RoomMessageListRestServlet,
which is async.
Chase the code path down from there:
- FederationHandler.maybe_backfill (and nested try_backfill)
- FederationHandler.backfill
|
|\| |
| | |
| | |
| | |
| | | |
* commit '7c429f92d':
Clean up some logging (#6515)
|
| | |
| | |
| | |
| | | |
This just makes some of the logging easier to follow when things start going
wrong.
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'fc316a489':
Prevent redacted events from appearing in message search (#6377)
|
| | | |
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'ea0f0ad41':
Prevent message search in upgraded rooms we're not in (#6385)
|
| | | |
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'f8bc2ae88':
Move get_state methods into FederationHandler (#6503)
|
| |/
| |
| |
| |
| | |
This is a non-functional refactor as a precursor to some other work.
|
|\|
| |
| |
| |
| | |
* commit '63d6ad106':
Stronger typing in the federation handler (#6480)
|
| |
| |
| |
| |
| | |
replace the event_info dict with an attrs thing
|
|\|
| |
| |
| |
| | |
* commit 'e1f4c83f4':
Sanity-check the rooms of auth events before pulling them in. (#6472)
|
| | |
|
|\|
| |
| |
| |
| |
| |
| | |
_update_auth_events_and_context_for_auth (#6468)
* commit 'e203874ca':
get rid of (most of) have_events from _update_auth_events_and_context_for_auth (#6468)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
_update_auth_events_and_context_for_auth (#6468)
have_events was a map from event_id to rejection reason (or None) for events
which are in our local database. It was used as filter on the list of
event_ids being passed into get_events_as_list. However, since
get_events_as_list will ignore any event_ids that are unknown or rejected, we
can equivalently just leave it to get_events_as_list to do the filtering.
That means that we don't have to keep `have_events` up-to-date, and can use
`have_seen_events` instead of `get_seen_events_with_rejection` in the one place
we do need it.
|
|\|
| |
| |
| |
| | |
* commit '54dd5dc12':
Add ephemeral messages support (MSC2228) (#6409)
|
| |
| |
| |
| |
| |
| |
| |
| | |
Implement part [MSC2228](https://github.com/matrix-org/matrix-doc/pull/2228). The parts that differ are:
* the feature is hidden behind a configuration flag (`enable_ephemeral_messages`)
* self-destruction doesn't happen for state events
* only implement support for the `m.self_destruct_after` field (not the `m.self_destruct` one)
* doesn't send synthetic redactions to clients because for this specific case we consider the clients to be able to destroy an event themselves, instead we just censor it (by pruning its JSON) in the database
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit '81731c6e7':
Fix: Pillow error when uploading RGBA image (#3325) (#6241)
Add User-Interactive Auth to /account/3pid/add (#6119)
Lint
Changelog
Discard retention policies when retrieving state
blacklist more tests
Newsfile
Add tests
Propagate reason in remotely rejected invites
MSC2367 Allow reason field on all member events
|
| | |
|
| |\
| | |
| | | |
Implement message retention policies (MSC1763)
|
| | |\ |
|
| | | | |
|
| | | | |
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* commit '651d930f1':
remove confusing fixme
newsfile
Use get_events_as_list rather than lots of calls to get_event
Update some docstrings and comments
Simplify _update_auth_events_and_context_for_auth
|
| | | | |
|
| |\ \ \
| | | |/
| | |/| |
|
| | | |
| | | |
| | | |
| | | | |
It's more efficient and clearer.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
move event_key calculation into _update_context_for_auth_events, since it's
only used there.
|
|\ \ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
* commit '6e1b40dc2':
sample config
Add changelog
A couple more instances
Replace instance variations of homeserver with correct case/spacing
|
| |/ / |
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
(#6320)
* commit '807ec3bd9':
Fix bug which caused rejected events to be stored with the wrong room state (#6320)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(#6320)
Fixes a bug where rejected events were persisted with the wrong state group.
Also fixes an occasional internal-server-error when receiving events over
federation which are rejected and (possibly because they are
backwards-extremities) have no prev_group.
Fixes #6289.
|
|\| |
| | |
| | |
| | |
| | | |
* commit '0e3ab8afd':
Add some checks that we aren't using state from rejected events (#6330)
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Raise an exception if accessing state for rejected events
Add some sanity checks on accessing state_group etc for
rejected events.
* Skip calculating push actions for rejected events
It didn't actually cause any bugs, because rejected events get filtered out at
various later points, but there's not point in trying to calculate the push
actions for a rejected event.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'f496d2587':
Incorporate review
Factor out an _AsyncEventContextImpl (#6298)
Update synapse/storage/data_stores/main/schema/delta/56/event_labels.sql
Add more data to the event_labels table and fix the indexes
Add unstable feature flag
Lint
Incorporate review
Lint
Changelog
Add integration tests for /messages
Add more integration testing
Add integration tests for sync
Add unit tests
Add index on label
Implement filtering
Store labels for new events
Add database table for keeping track of labels on events
|
| |
| |
| |
| |
| |
| | |
The intention here is to make it clearer which fields we can expect to be
populated when: notably, that the _event_type etc aren't used for the
synchronous impl of EventContext.
|
|\|
| |
| |
| |
| | |
* commit 'ace947e8d':
Depublish a room from the public rooms list when it is upgraded (#6232)
|
| | |
|
|\|
| |
| |
| |
| | |
* commit '020add509':
Update black to 19.10b0 (#6304)
|
| |
| |
| | |
* update version of black and also fix the mypy config being overridden
|
|\| |
|
| |\
| | |
| | | |
Add StateGroupStorage interface
|
| | | |
|
|\| | |
|
| |/
| |
| | |
Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
|
|\| |
|
| |\
| | |
| | |
| | | |
erikj/split_out_persistence_store
|
| | | |
|
|\ \ \
| | |/
| |/|
| | | |
* commit 'a2276d4d3':
|
| | | |
|
|\| |
| | |
| | |
| | |
| | | |
* commit '172f264ed':
Improve signature checking on some federation APIs (#6262)
|
| |/
| |
| |
| |
| | |
Make sure that we check that events sent over /send_join, /send_leave, and
/invite, are correctly signed and come from the expected servers.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit '93eaeec75':
Remove Auth.check method (#6217)
add note about database upgrade
use the right function for when we're already in runInteraction
add user signature stream change cache to slaved device store
black
use stream ID generator instead of timestamp
make isort happy
apply PR review suggestions
fix formatting
add changelog
make changes from PR review
don't need to return the hidden column any more
really fix queries to work with Postgres
PostgreSQL, Y U no like?
remove extra SQL query param
add changelog file
apply changes from PR review
allow uploading keys for cross-signing
allow devices to be marked as "hidden"
|
| |
| |
| | |
This method was somewhat redundant, and confusing.
|
|\|
| |
| |
| |
| |
| |
| | |
* commit '47ada4dff':
changelog
rip out some unreachable code
Remove dead check_auth script
|
| |
| |
| |
| | |
The only possible rejection reason is AUTH_ERROR, so all of this is unreachable.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
While this is not documented in the spec (but should be), Riot (and other clients) revoke 3PID invites by sending a m.room.third_party_invite event with an empty ({}) content to the room's state.
When the invited 3PID gets associated with a MXID, the identity server (which doesn't know about revocations) sends down to the MXID's homeserver all of the undelivered invites it has for this 3PID. The homeserver then tries to talk to the inviting homeserver in order to exchange these invite for m.room.member events.
When one of the invite is revoked, the inviting homeserver responds with a 500 error because it tries to extract a 'display_name' property from the content, which is empty. This might cause the invited server to consider that the server is down and not try to exchange other, valid invites (or at least delay it).
This fix handles the case of revoked invites by avoiding trying to fetch a 'display_name' from the original invite's content, and letting the m.room.member event fail the auth rules (because, since the original invite's content is empty, it doesn't have public keys), which results in sending a 403 with the correct error message to the invited server.
|
|\|
| |
| |
| | |
params to docstring (#6010)
|
| |
| |
| |
| |
| |
| |
| | |
params to docstring (#6010)
Another small fixup noticed during work on a larger PR. The `origin` field of `add_display_name_to_third_party_invite` is not used and likely was just carried over from the `on_PUT` method of `FederationThirdPartyInviteExchangeServlet` which, like all other servlets, provides an `origin` argument.
Since it's not used anywhere in the handler function though, we should remove it from the function arguments.
|
|\| |
|
| |
| |
| |
| |
| | |
Python will return a tuple whether there are parentheses around the returned values or not.
I'm just sick of my editor complaining about this all over the place :)
|
|\| |
|
| | |
|
|\| |
|
| |\
| | |
| | | |
Handle RequestSendFailed exception correctly in more places.
|
| | | |
|
|\| | |
|
| |/ |
|
| |\
| | |
| | | |
Log when we receive a /make_* request from a different origin
|
|\ \ \
| | |/
| |/| |
|
| | | |
|
|\ \ \
| | |/
| |/| |
|
| |/ |
|
|\| |
|
| | |
|
|\| |
|
| | |
|
| |\
| | |
| | | |
Handle the case of `get_missing_events` failing
|
| | | |
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I had to add quite a lot of logging to diagnose a problem with 3pid
invites - we only logged the one failure which isn't all that
informative.
NB. I'm not convinced the logic of this loop is right: I think it
should just accept a single valid signature from a trusted source
rather than fail if *any* signature is invalid. Also it should
probably not skip the rest of middle loop if a check fails? However,
I'm deliberately not changing the logic here.
|
|\ \ \
| | |/
| |/| |
|
| | | |
|
|\| |
| | |
| | |
| | | |
erikj/fix_get_missing_events_error
|
| |\|
| | |
| | |
| | | |
erikj/fix_get_missing_events_error
|
| | |\
| | | |
| | | | |
Fix 3PID invite room state over federation.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently if a call to `/get_missing_events` fails we log an exception
and stop processing the top level event we received over federation.
Instead let's try and handle it sensibly given it is a somewhat expected
failure mode.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
While this is not documented in the spec (but should be), Riot (and other clients) revoke 3PID invites by sending a m.room.third_party_invite event with an empty ({}) content to the room's state.
When the invited 3PID gets associated with a MXID, the identity server (which doesn't know about revocations) sends down to the MXID's homeserver all of the undelivered invites it has for this 3PID. The homeserver then tries to talk to the inviting homeserver in order to exchange these invite for m.room.member events.
When one of the invite is revoked, the inviting homeserver responds with a 500 error because it tries to extract a 'display_name' property from the content, which is empty. This might cause the invited server to consider that the server is down and not try to exchange other, valid invites (or at least delay it).
This fix handles the case of revoked invites by avoiding trying to fetch a 'display_name' from the original invite's content, and letting the m.room.member event fail the auth rules (because, since the original invite's content is empty, it doesn't have public keys), which results in sending a 403 with the correct error message to the invited server.
|
| | | | |
|
|\ \ \ \
| | |_|/
| |/| | |
Port "Fix 3PID invite room state over federation" to dinsic
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes that when a user exchanges a 3PID invite for a proper invite over
federation it does not include the `invite_room_state` key.
This was due to synapse incorrectly sending out two invite requests.
|
|\ \ \ \
| | |_|/
| |/| | |
|
| |/ / |
|
|\| | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When processing an incoming event over federation, we may try and
resolve any unexpected differences in auth events. This is a
non-essential process and so should not stop the processing of the event
if it fails (e.g. due to the remote disappearing or not implementing the
necessary endpoints).
Fixes #3330
|
| | |
| | |
| | |
| | |
| | | |
I was staring at this function trying to figure out wtf it was actually
doing. This is (hopefully) a non-functional refactor which makes it a bit
clearer.
|
|\| | |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
When considering the candidates to be forward-extremities, we must exclude soft
failures.
Hopefully fixes #5090.
|
| |
| |
| |
| |
| |
| | |
(#5061)
Co-Authored-By: babolivier <contact@brendanabolivier.com>
|
|\| |
|
| |
| |
| |
| | |
Collect all the things that make room-versions different to one another into
one place, so that it's easier to define new room versions.
|
| | |
|
|\| |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
When filtering events to send to server we check more than just history
visibility. However when deciding whether to backfill or not we only
care about the history visibility.
|
| | |
|
| |\
| | |
| | |
| | | |
erikj/stop_fed_not_in_room
|
| | | |
|
| | | |
|
| |/
|/| |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
| |
The transaction queue only sends out events that we generate. This was
done by checking domain of event ID, but that can no longer be used.
Instead, we may as well use the sender field.
|
|
|
|
|
|
|
|
| |
We currently pass FrozenEvent instead of `dict` to
`compute_event_signature`, which works by accident due to `dict(event)`
producing the correct result.
This fixes PR #4493 commit 855a151
|
|\
| |
| | |
Split up event validation between event and builder
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The validator was being run on the EventBuilder objects, and so the
validator only checked a subset of fields. With the upcoming
EventBuilder refactor even fewer fields will be there to validate.
To get around this we split the validation into those that can be run
against an EventBuilder and those run against a fully fledged event.
|
|/ |
|
| |
|
|\ |
|
| |\
| | |
| | | |
Add room_version param to get_pdu
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
When we add new event format we'll need to know the event format or room
version when parsing events.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently they're stored as non-outliers even though the server isn't in
the room, which can be problematic in places where the code assumes it
has the state for all non outlier events.
In particular, there is an edge case where persisting the leave event
triggers a state resolution, which requires looking up the room version
from state. Since the server doesn't have the state, this causes an
exception to be thrown.
|
|/
|
|
|
| |
We also implement `make_membership_event` converting the returned
room version to an event format version.
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Add helpers for getting prev and auth events
This is in preparation for allowing the event format to change between
room versions.
|
|\
| |
| | |
Add v2 state resolution algorithm
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
`on_new_notifications` and `on_new_receipts` in `HttpPusher` and `EmailPusher`
now always return synchronously, so we can remove the `defer.gatherResults` on
their results, and the `run_as_background_process` wrappers can be removed too
because the PusherPool methods will now complete quickly enough.
|
|/
|
|
|
|
|
|
|
| |
It's quite important that get_missing_events returns the *latest* events in the
room; however we were pulling event ids out of the database until we got *at
least* 10, and then taking the *earliest* of the results.
We also shouldn't really be relying on depth, and should be checking the
room_id.
|
| |
|