Skip to content
Snippets Groups Projects
  1. Feb 16, 2023
  2. Feb 14, 2023
  3. Feb 10, 2023
  4. Feb 09, 2023
    • Shay's avatar
      Add a class UnpersistedEventContext to allow for the batching up of storing state groups (#14675) · 03bccd54
      Shay authored
      
      * add class UnpersistedEventContext
      
      * modify create new client event to create unpersistedeventcontexts
      
      * persist event contexts after creation
      
      * fix tests to persist unpersisted event contexts
      
      * cleanup
      
      * misc lints + cleanup
      
      * changelog + fix comments
      
      * lints
      
      * fix batch insertion?
      
      * reduce redundant calculation
      
      * add unpersisted event classes
      
      * rework compute_event_context, split into function that returns unpersisted event context and then persists it
      
      * use calculate_context_info to create unpersisted event contexts
      
      * update typing
      
      * $%#^&*
      
      * black
      
      * fix comments and consolidate classes, use attr.s for class
      
      * requested changes
      
      * lint
      
      * requested changes
      
      * requested changes
      
      * refactor to be stupidly explicit
      
      * clearer renaming and flow
      
      * make partial state non-optional
      
      * update docstrings
      
      ---------
      
      Co-authored-by: default avatarErik Johnston <erik@matrix.org>
      03bccd54
    • Patrick Cloke's avatar
      Respond correctly to unknown methods on known endpoints (#14605) · d22c1c86
      Patrick Cloke authored
      Respond with a 405 error if a request is received on a known endpoint,
      but to an unknown method, per MSC3743.
      d22c1c86
    • David Robertson's avatar
      Proper types for `tests.module_api` (#15031) · 7081bb56
      David Robertson authored
      * -> None for test methods
      
      * A first batch of type fixes
      
      * Introduce common parent test case
      
      * Fixup that big test method
      
      * tests.module_api passes mypy
      
      * Changelog
      7081bb56
  5. Feb 08, 2023
  6. Feb 07, 2023
  7. Feb 06, 2023
  8. Feb 03, 2023
  9. Feb 01, 2023
  10. Jan 31, 2023
    • Sean Quah's avatar
      Make sqlite database migrations transactional again, part two (#14926) · 6d14fdc2
      Sean Quah authored
      
      #14910 fixed the regression introduced by #13873 where sqlite database
      migrations would no longer run inside a transaction. However, it
      committed the transaction before Synapse updated its bookkeeping of
      which migrations have been run, which means that migrations may be run
      again after they have completed successfully.
      
      Leave the transaction open at the end of `executescript`, to restore the
      old, correct behaviour. Also make the PostgreSQL behaviour consistent
      with SQLite.
      
      Fixes #14909.
      
      Signed-off-by: default avatarSean Quah <seanq@matrix.org>
      6d14fdc2
  11. Jan 30, 2023
    • David Robertson's avatar
      Handle malformed values of `notification.room` in power level events (#14942) · 510d4b06
      David Robertson authored
      * Better test for bad values in power levels events
      
      The previous test only checked that Synapse didn't raise an exception,
      but didn't check that we had correctly interpreted the value of the
      dodgy power level.
      
      It also conflated two things: bad room notification levels, and bad user
      levels. There _is_ logic for converting the latter to integers, but we
      should test it separately.
      
      * Check we ignore types that don't convert to int
      
      * Handle `None` values in `notifications.room`
      
      * Changelog
      
      * Also test that bad values are rejected by event auth
      
      * Docstring
      
      * linter scripttttttttt
      510d4b06
  12. Jan 27, 2023
    • Patrick Cloke's avatar
      Implement MSC3952: Intentional mentions (#14823) · 2a51f3ec
      Patrick Cloke authored
      MSC3952 defines push rules which searches for mentions in a list of
      Matrix IDs in the event body, instead of searching the entire event
      body for display name / local part.
      
      This is implemented behind an experimental configuration flag and
      does not yet implement the backwards compatibility pieces of the MSC.
      2a51f3ec
  13. Jan 26, 2023
  14. Jan 25, 2023
  15. Jan 23, 2023
    • David Robertson's avatar
      Faster joins: omit partial rooms from eager syncs until the resync completes (#14870) · 80d44060
      David Robertson authored
      
      * Allow `AbstractSet` in `StrCollection`
      
      Or else frozensets are excluded. This will be useful in an upcoming
      commit where I plan to change a function that accepts `List[str]` to
      accept `StrCollection` instead.
      
      * `rooms_to_exclude` -> `rooms_to_exclude_globally`
      
      I am about to make use of this exclusion mechanism to exclude rooms for
      a specific user and a specific sync. This rename helps to clarify the
      distinction between the global config and the rooms to exclude for a
      specific sync.
      
      * Better function names for internal sync methods
      
      * Track a list of excluded rooms on SyncResultBuilder
      
      I plan to feed a list of partially stated rooms for this sync to ignore
      
      * Exclude partial state rooms during eager sync
      
      using the mechanism established in the previous commit
      
      * Track un-partial-state stream in sync tokens
      
      So that we can work out which rooms have become fully-stated during a
      given sync period.
      
      * Fix mutation of `@cached` return value
      
      This was fouling up a complement test added alongside this PR.
      Excluding a room would mean the set of forgotten rooms in the cache
      would be extended. This means that room could be erroneously considered
      forgotten in the future.
      
      Introduced in #12310, Synapse 1.57.0. I don't think this had any
      user-visible side effects (until now).
      
      * SyncResultBuilder: track rooms to force as newly joined
      
      Similar plan as before. We've omitted rooms from certain sync responses;
      now we establish the mechanism to reintroduce them into future syncs.
      
      * Read new field, to present rooms as newly joined
      
      * Force un-partial-stated rooms to be newly-joined
      
      for eager incremental syncs only, provided they're still fully stated
      
      * Notify user stream listeners to wake up long polling syncs
      
      * Changelog
      
      * Typo fix
      
      Co-authored-by: default avatarSean Quah <8349537+squahtx@users.noreply.github.com>
      
      * Unnecessary list cast
      
      Co-authored-by: default avatarSean Quah <8349537+squahtx@users.noreply.github.com>
      
      * Rephrase comment
      
      Co-authored-by: default avatarSean Quah <8349537+squahtx@users.noreply.github.com>
      
      * Another comment
      
      Co-authored-by: default avatarSean Quah <8349537+squahtx@users.noreply.github.com>
      
      * Fixup merge(?)
      
      * Poke notifier when receiving un-partial-stated msg over replication
      
      * Fixup merge whoops
      
      Thanks MV :)
      
      Co-authored-by: default avatarMathieu Velen <mathieuv@matrix.org>
      
      Co-authored-by: default avatarMathieu Velten <mathieuv@matrix.org>
      Co-authored-by: default avatarSean Quah <8349537+squahtx@users.noreply.github.com>
      80d44060
    • Patrick Cloke's avatar
      Skip processing stats for broken rooms. (#14873) · 82d3efa3
      Patrick Cloke authored
      * Skip processing stats for broken rooms.
      
      * Newsfragment
      
      * Use a custom exception.
      82d3efa3
Loading