aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-04Version 0.6.5 (#2254)v0.6.5Neil Alexander
* Version and changelog * Update changelog * Update changelog * Update readme * Update readme some more * Fix date in changelog
2022-03-04Revert NATS server upgrade in 00b3545b14ca5e6987be93cabafc51e771f8bcc7Neil Alexander
2022-03-04Mark soft-failed events as rejected in `roomserver_events` (#2252)Neil Alexander
2022-03-04Fix memory leaks with SQLite prepared statements (#2253)Neil Alexander
2022-03-04Un-ratelimit calls to /thumbnail (#2251)S7evinK
2022-03-04Fix a panic in `OnIncomingMessagesRequest` (#2250)Neil Alexander
It's possible for `GetStateEvent` to return `nil` if there was no error but the state event wasn't found. Therefore we need to be prepared for that case. This should fix #2247.
2022-03-03Send profile updates asynchronously (#2246)Neil Alexander
2022-03-03Return 404 if event given to `/context` was not found (#2245)Neil Alexander
2022-03-03Clean old notifications regularly (#2244)Neil Alexander
* Clean old notifications regularly We'll keep highlights for a month and non-highlights for a day, to stop the `userapi_notifications` table from growing indefinitely. We'll also allow storing events even if no pushers are present, because apparently Element Web expects to work that way. * Fix the milliseconds * Use process context * Update sytest lists * Fix build issue
2022-03-03Don't open two connections for the userapiTill Faelligen
2022-03-03Test `/context/ with lazy_load_members filter works` should be OK nowNeil Alexander
2022-03-03Give more time to `TestSessionCleanUp` testsNeil Alexander
2022-03-03Handle `ErrNoRows` when sending read updatesNeil Alexander
2022-03-03Only store notifications for users with pushers, de-parallelise ↵Neil Alexander
`TestSessionCleanUp` for now
2022-03-03Implement Push Notifications (#1842)Dan
* Add Pushserver component with Pushers API Co-authored-by: Tommie Gannert <tommie@gannert.se> Co-authored-by: Dan Peleg <dan@globekeeper.com> * Wire Pushserver component Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com> * Add PushGatewayClient. The full event format is required for Sytest. * Add a pushrules module. * Change user API account creation to use the new pushrules module's defaults. Introduces "scope" as required by client API, and some small field tweaks to make some 61push Sytests pass. * Add push rules query/put API in Pushserver. This manipulates account data over User API, and fires sync messages for changes. Those sync messages should, according to an existing TODO in clientapi, be moved to userapi. Forks clientapi/producers/syncapi.go to pushserver/ for later extension. * Add clientapi routes for push rules to Pushserver. A cleanup would be to move more of the name-splitting logic into pushrules.go, to depollute routing.go. * Output rooms.join.unread_notifications in /sync. This is the read-side. Pushserver will be the write-side. * Implement pushserver/storage for notifications. * Use PushGatewayClient and the pushrules module in Pushserver's room consumer. * Use one goroutine per user to avoid locking up the entire server for one bad push gateway. * Split pushing by format. * Send one device per push. Sytest does not support coalescing multiple devices into one push. Matches Synapse. Either we change Sytest, or remove the group-by-url-and-format logic. * Write OutputNotificationData from push server. Sync API is already the consumer. * Implement read receipt consumers in Pushserver. Supports m.read and m.fully_read receipts. * Add clientapi route for /unstable/notifications. * Rename to UpsertPusher for clarity and handle pusher update * Fix linter errors * Ignore body.Close() error check * Fix push server internal http wiring * Add 40 newly passing 61push tests to whitelist * Add next 12 newly passing 61push tests to whitelist * Send notification data before notifying users in EDU server consumer * NATS JetStream * Goodbye sarama * Fix `NewStreamTokenFromString` * Consume on the correct topic for the roomserver * Don't panic, NAK instead * Move push notifications into the User API * Don't set null values since that apparently causes Element upsetti * Also set omitempty on conditions * Fix bug so that we don't override the push rules unnecessarily * Tweak defaults * Update defaults * More tweaks * Move `/notifications` onto `r0`/`v3` mux * User API will consume events and read/fully read markers from the sync API with stream positions, instead of consuming directly Co-authored-by: Piotr Kozimor <p1996k@gmail.com> Co-authored-by: Tommie Gannert <tommie@gannert.se> Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-03-03Update `sytest-whitelist` for changes in matrix-org/sytest#1200Neil Alexander
2022-03-02Skip flakey test for nowKegan Dougal
2022-03-02Media endpoints on `/v3` (#2242)Neil Alexander
* Media endpoints on `/v3` * Keep `/v1` too?
2022-03-02Fix data race in unit testsKegan Dougal
2022-03-02Update NATS Server to v2.7.3Neil Alexander
2022-03-01Use correct stream provider in `Latest` for `ReceiptPosition`Neil Alexander
2022-03-01Add unit test for device list update debouncing (#2220)kegsay
* Add unit test for device list update debouncing * bugfix: actually return stale device lists in the test... Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-03-01Set max age of 5 minutes for spaces summary cacheNeil Alexander
2022-03-01Allow specifying max age for caches (#2239)Neil Alexander
* Allow specifying max age for caches * Evict cache entry if it's found to be stale when we call Get * Fix bugs
2022-03-01Hopefully fix read receipts (#2241)Neil Alexander
2022-03-01Only allow device deletion from session UIA was initiated from (#2235)S7evinK
* Only allow device deletion if the session matches * Make the challenge response available to other packages * Remove userID, as it's not in the spec * Remove tests * Add passing test & remove obsolete config * Rename field, add comment Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-03-01msc2946: add federation cache (#2238)kegsay
2022-03-01Make complement go fast (#2240)kegsay
2022-03-01Also don't send null back when the target room isn't a space roomKegan Dougal
2022-03-01Return state on calls to /message and lazy load members (#2218)S7evinK
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-03-01Remove unnecessary error line (#2237)Neil Alexander
Previously this error line would print because we were pulling out all user memberships, but now this is no longer necessary — an event state key that we don't know will no longer get passed to `SelectJoinedUsersSetForRooms` at all.
2022-03-01Always send [] from federated rooms, not nullKegan Dougal
2022-03-01Bump GMSL versionKegan Dougal
2022-03-01MSC2946: Spaces Summary (round 2) (#2232)kegsay
* Initial cut at fixing up MSC2946 to work with latest spec * bugfix: send response back correctly * Initial working version of MSC2946 * msc2946: handle suggested_only; remove custom database As the MSC doesn't require reverse lookups, we can just pull the room state and inspect via the roomserver database. To handle this, expand QueryCurrentState to support wildcards. Use all this and handle `?suggested_only`. * Sort child rooms * msc2946: Make TestClientSpacesSummary pass * msc2946: allow invited rooms to be spidered * msc2946: support basic federation requests * fix up go mod
2022-03-01Limit `JoinedUsersSetInRooms` to interested users (#2234)Neil Alexander
* Limit database work in `JoinedUsersSetInRooms` to changed user IDs only * Comments * Fix variadic params for SQLite, update comments
2022-03-01Check for changes in `PerformUploadDeviceKeys` (#2233)Neil Alexander
* Don't generate key change notifs if nothing changed on cross-signing upload * Check both directions of changes
2022-02-28Update `Events` call-sites which now don't return an error, update ↵Neil Alexander
`parsedRespState` to sort (#2227) * Topologically sort with `SendEventWithState`, so that earlier events should satisfy auth for later ones * Revert "Topologically sort with `SendEventWithState`, so that earlier events should satisfy auth for later ones" This reverts commit b0cd706012b4c9b6724b11e16f19c4cb732ab286. * Update to matrix-org/gomatrixserverlib#293 * `Events` no longer returns an error, other tweaks * Make sure `Events` is sorted for `parsedRespState` too
2022-02-28Add possibility to reset password using create-account (#2231)S7evinK
* Add possibility to reset password * Invalidate logins * Fix test
2022-02-25Update systemd example to set `LimitNOFILE`Neil Alexander
2022-02-25Remember parameters on registration (#2225)S7evinK
* Remember parameters for sessions Cleanup sessions on successfully registering or after a while * Add flakey test * Update to use time.AfterFunc, add more tests * Try to drain the channel, if possible
2022-02-24Reduce allocations significantly in state res v2, which should help to keep ↵Neil Alexander
memory down when joining rooms too (update to matrix-org/gomatrixserverlib@f6ab9c5)
2022-02-24State resolution v2 micro-optimisations (#2226)Neil Alexander
* Don't populate duplicates into auth events * Only append the single event * Potentially reduce number of iterations in `isInAllAuthLists
2022-02-23Relax roomserver input transactional isolation (#2224)Neil Alexander
* Don't force full transactional isolation on roomserver input * Set succeeded * Tweak `MissingAuthPrevEvents`
2022-02-23Update to matrix-org/pinecone@0f0afd1a46aabf7b1e48cb607bc9fa6a083aade6Neil Alexander
2022-02-22Version 0.6.4 (#2212)v0.6.4Neil Alexander
* Version 0.6.4 * Tweaks * Update changelog * Update changelog one last time
2022-02-22Send device update to local users if remote display name changes (#2215)S7evinK
* Send device_list update to satisfy sytest * Fix build issue from merged in change Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-02-22Remote banned user is kicked and may not rejoin until unbanned (#2216)S7evinK
* Remote banned user is kicked and may not rejoin until unbanned * Use gmsl constant
2022-02-22Add `DeviceKeysEqual` (#2219)Neil Alexander
* Add `DeviceKeysEqual` * Update check order * Fix check * Tweak conditions again * One more time * Single return value
2022-02-22Remove logging line in `PerformInvite`Neil Alexander
2022-02-22Remove error when state keys are missing for user NIDs (#2213)Neil Alexander
* Remove error when state keys are missing for user NIDs There is still an actual bug here somewhere in the membership updater, but this check does more harm than good, since it means that the key consumers don't actually distribute updates to *anyone*. It's better just to deal with this silently for now. To find these broken rows: ``` SELECT * FROM roomserver_membership AS m WHERE NOT EXISTS ( SELECT event_state_key_nid FROM roomserver_event_state_keys AS s WHERE m.sender_nid = s.event_state_key_nid ); ``` * Logging