- May 21, 2021
-
-
Andrew Morgan authored
https://github.com/matrix-org/synapse/issues/9962 uncovered that we accidentally removed all but one of the presence updates that we store in the database when persisting multiple updates. This could cause users' presence state to be stale. The bug was fixed in #10014, and this PR just adds a test that failed on the old code, and was used to initially verify the bug. The test attempts to insert some presence into the database in a batch using `PresenceStore.update_presence`, and then simply pulls it out again.
-
Patrick Cloke authored
-
Marek Matys authored
Fixes: https://github.com/matrix-org/synapse/issues/9962 This is a fix for above problem. I fixed it by swaping the order of insertion of new records and deletion of old ones. This ensures that we don't delete fresh database records as we do deletes before inserts. Signed-off-by:
Marek Matys <themarcq@gmail.com>
-
Erik Johnston authored
-
- May 20, 2021
-
-
Erik Johnston authored
Also add support for giving a callback to generate the JSON object to verify. This should reduce memory usage, as we no longer have the event in memory in dict form (which has a large memory footprint) for extend periods of time.
-
Erik Johnston authored
Instead of parsing the full response to `/send_join` into Python objects (which can be huge for large rooms) and *then* parsing that into events, we instead use ijson to stream parse the response directly into `EventBase` objects.
-
Patrick Cloke authored
This finishes up the experimental implementation of MSC3083 by showing the restricted rooms in the spaces summary (from MSC2946).
-
Andrew Morgan authored
-
Javier Junquera Sánchez authored
Signed-off-by:
Javier Junquera Sánchez <javier@junquera.io>
-
- May 19, 2021
-
-
Erik Johnston authored
-
Savyasachee Jha authored
Signed-off-by:
Savyasachee Jha <savya.jha@hawkradius.com>
-
- May 18, 2021
-
-
Patrick Cloke authored
To be more consistent with similar code. The check now automatically raises an AuthError instead of passing back a boolean. It also absorbs some shared logic between callers.
-
Andrew Morgan authored
Use a database table to hold the users that should have full presence sent to them, instead of something in-memory (#9823)
-
- May 17, 2021
-
-
Patrick Cloke authored
\x7F was meant to be \0x7E (~) this was originally incorrect in MSC1772.
-
Patrick Cloke authored
-
Erik Johnston authored
-
Erik Johnston authored
-
Erik Johnston authored
-
Brendan Abolivier authored
Co-authored-by:
Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
-
- May 14, 2021
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
Turns out these scripts weren't getting linted.
-
Richard van der Hoff authored
- use a tuple rather than a list for the iterable that is passed into the wrapped function, for performance - test that we can pass an iterable and that keys are correctly deduped.
-
Dan Callahan authored
It's not obvious that instances of SQLBaseStore each need their own instances of random.SystemRandom(); let's just use random directly. Introduced by 52839886 Signed-off-by:
Dan Callahan <danc@element.io>
-
Dan Callahan authored
Our strtobool already returns a bool, so no need to re-cast here Signed-off-by:
Dan Callahan <danc@element.io>
-
Dan Callahan authored
We can get away with just catching UnicodeError here. ⋮ +-- ValueError | +-- UnicodeError | +-- UnicodeDecodeError | +-- UnicodeEncodeError | +-- UnicodeTranslateError ⋮ https://docs.python.org/3/library/exceptions.html#exception-hierarchy Signed-off-by:
Dan Callahan <danc@element.io>
-
Dan Callahan authored
Functionally identical, but more obviously cryptographically secure. ...Explicit is better than implicit? Avoids needing to know that SystemRandom() implies a CSPRNG, and complies with the big scary red box on the documentation for random: > Warning: > The pseudo-random generators of this module should not be used for > security purposes. For security or cryptographic uses, see the > secrets module. https://docs.python.org/3/library/random.html Signed-off-by:
Dan Callahan <danc@element.io>
-
Richard van der Hoff authored
Add a config option which allows enabling opentracing by user id, eg for debugging requests made by a test user.
-
Andrew Morgan authored
-
- May 13, 2021
-
-
Patrick Cloke authored
-
- May 12, 2021
-
-
Brendan Abolivier authored
-
Brendan Abolivier authored
-
Brendan Abolivier authored
* Correctly ratelimit invites when creating a room Also allow ratelimiting for more than one action at a time.
-
Richard van der Hoff authored
-
Erik Johnston authored
- May 11, 2021
-
-
Richard van der Hoff authored
-
Patrick Cloke authored
This should help ensure that equivalent results are achieved between homeservers querying for the summary of a space. This implements modified MSC1772 rules, according to MSC2946. The different is that the origin_server_ts of the m.room.create event is not used as a tie-breaker since this might not be known if the homeserver is not part of the room.
-
Patrick Cloke authored
Per changes in MSC2946, the C-S and S-S APIs for spaces summary should use GET requests. Until this is stable, the POST endpoints still exist. This does not switch federation requests to use the GET version yet since it is newly added and already deployed servers might not support it. When switching to the stable endpoint we should switch to GET requests.
-
Patrick Cloke authored
MSC1772 specifies the m.room.create event should be sent as part of the invite_state. This was done optionally behind an experimental flag, but is now done by default due to MSC1772 being approved.
-