Eric Eastwood
63c7b5017a
(doesn't work) Add test for batch persisting multiple member events for the same user
2024-06-27 16:34:41 -05:00
Eric Eastwood
eb159c11cd
Don't worry about state_reset
for now
...
See:
- Why no `COALESCE` https://github.com/element-hq/synapse/pull/17320#discussion_r1657435662
- Don't worry about `state_reset` for now, https://github.com/element-hq/synapse/pull/17320#discussion_r1657562645
2024-06-27 14:38:55 -05:00
Eric Eastwood
81c06bec20
Detect state resets
2024-06-27 11:50:18 -05:00
Eric Eastwood
15fcead2a5
Slight clean-up
2024-06-27 11:33:41 -05:00
Eric Eastwood
830e09d2de
Grab prev_membership
to see whether the server left the room (fixes tests)
...
See https://github.com/element-hq/synapse/pull/17320#discussion_r1657170493
`prev_membership` helps determine whether we should include the `event_id=null` row because
we can check whether we have already left.
- When we leave the room causing the server to leave the room, the `prev_event_id` will be our join event
- When the server leaves the room after us, the `prev_event_id` will be leave event
- In the state reset case, `prev_event_id` will be our join event
2024-06-27 10:20:33 -05:00
Eric Eastwood
956f20ef74
(currently failing) Add test to make sure membership changes don't re-appear if the server leaves the room later
2024-06-27 01:24:37 -05:00
Eric Eastwood
935b98c474
All get_current_state_delta_membership_changes_for_user(...)
tests passing
2024-06-27 00:49:51 -05:00
Eric Eastwood
7eb1806ee3
Fix lints
2024-06-26 21:06:05 -05:00
Eric Eastwood
b7914e7676
Add skipped test for state resets
2024-06-26 21:01:54 -05:00
Eric Eastwood
8df39d1baf
Remove redundant instance_name
column
2024-06-26 20:22:03 -05:00
Eric Eastwood
2a944ffcef
Add state of the db in each situation
2024-06-26 20:20:17 -05:00
Eric Eastwood
48d0acfbcd
Actually test get_current_state_delta_membership_changes_for_user(...)
in remote join test
2024-06-26 19:52:12 -05:00
Eric Eastwood
0b9a903ca1
Add test that remotely joins room
2024-06-26 19:35:18 -05:00
Eric Eastwood
ec2d8dc1e3
Create events using helper
2024-06-26 18:52:24 -05:00
Eric Eastwood
2bf39231ed
Add some tests for get_current_state_delta_membership_changes_for_user(...)
2024-06-26 18:40:36 -05:00
Eric Eastwood
e5b8a3e37f
Add stream_ordering
sort to Sliding Sync /sync
( #17293 )
...
Sort is no longer configurable and we always sort rooms by the `stream_ordering` of the last event in the room or the point where the user can see up to in cases of leave/ban/invite/knock.
2024-06-17 11:27:14 -05:00
Eric Eastwood
ebdce69f6a
Fix get_last_event_in_room_before_stream_ordering(...)
finding the wrong last event ( #17295 )
...
PR where this was introduced: https://github.com/matrix-org/synapse/pull/14817
### What does this affect?
`get_last_event_in_room_before_stream_ordering(...)` is used in Sync v2 in a lot of different state calculations.
`get_last_event_in_room_before_stream_ordering(...)` is also used in `/rooms/{roomId}/members`
2024-06-13 11:00:52 -05:00
Erik Johnston
23740eaa3d
Correctly mention previous copyright ( #16820 )
...
During the migration the automated script to update the copyright
headers accidentally got rid of some of the existing copyright lines.
Reinstate them.
2024-01-23 11:26:48 +00:00
Patrick Cloke
8e1e62c9e0
Update license headers
2023-11-21 15:29:58 -05:00
Patrick Cloke
42aea0d8af
Add final type hint to tests.unittest. ( #15072 )
...
Adds a return type to HomeServerTestCase.make_homeserver and deal
with any variables which are no longer Any.
2023-02-14 14:03:35 -05:00
Patrick Cloke
3ac412b4e2
Require types in tests.storage. ( #14646 )
...
Adds missing type hints to `tests.storage` package
and does not allow untyped definitions.
2022-12-09 12:36:32 -05:00
Patrick Cloke
4283bd1cf9
Support filtering the /messages API by relation type (MSC3874). ( #14148 )
...
Gated behind an experimental configuration flag.
2022-10-17 11:32:11 -04:00
Eric Eastwood
793d03e2c5
Generate historic pagination token for /messages
when no ?from
token provided ( #12370 )
2022-04-06 11:40:28 +01:00
Richard van der Hoff
33ebee47e4
Remove redundant get_success
calls in test code ( #12346 )
...
There are a bunch of places we call get_success on an immediate value, which is unnecessary. Let's rip them out, and remove the redundant functionality in get_success and friends.
2022-04-01 16:10:31 +01:00
Patrick Cloke
ea27528b5d
Support stable identifiers for MSC3440: Threading ( #12151 )
...
The unstable identifiers are still supported if the experimental configuration
flag is enabled. The unstable identifiers will be removed in a future release.
2022-03-10 15:36:13 +00:00
Richard van der Hoff
e24ff8ebe3
Remove HomeServer.get_datastore()
( #12031 )
...
The presence of this method was confusing, and mostly present for backwards
compatibility. Let's get rid of it.
Part of #11733
2022-02-23 11:04:02 +00:00
Patrick Cloke
a19d01c3d9
Support filtering by relations per MSC3440 ( #11236 )
...
Adds experimental support for `relation_types` and `relation_senders`
fields for filters.
2021-11-09 08:10:58 -05:00
Mark Haines
7e2f971c08
Remove some unused functions ( #711 )
...
* Remove some unused functions
* get_room_events_stream is only used in tests
* is_exclusive_room might actually be something we want
2016-04-08 14:01:56 +01:00
Mark Haines
700487a7c7
Fix flake8 warnings for tests
2016-02-19 15:34:38 +00:00
Matthew Hodgson
6c28ac260c
copyrights
2016-01-07 04:26:29 +00:00
Daniel Wagner-Hall
771ca56c88
Remove more unused parameters
2015-11-02 15:31:57 +00:00
Daniel Wagner-Hall
7213588083
Implement configurable stats reporting
...
SYN-287
This requires that HS owners either opt in or out of stats reporting.
When --generate-config is passed, --report-stats must be specified
If an already-generated config is used, and doesn't have the
report_stats key, it is requested to be set.
2015-09-22 12:57:40 +01:00
Mark Haines
896253e085
Factor out some of the common homeserver setup code into a
...
setup_test_homeserver function in utils.
2015-02-11 11:37:30 +00:00
Mark Haines
1c06c48ce2
Replace hs.parse_roomid with RoomID.from_string
2015-01-23 11:55:12 +00:00
Mark Haines
5759bec43c
Replace hs.parse_userid with UserID.from_string
2015-01-23 11:47:15 +00:00
Erik Johnston
3c77d13aa5
Kill off synapse.api.events.*
2014-12-16 11:29:05 +00:00
Erik Johnston
9191292b0f
Fix prev_content
2014-12-11 15:16:55 +00:00
Erik Johnston
4d6af0dde3
Fix some tests
2014-12-10 18:00:57 +00:00
Erik Johnston
3cd9c02f71
Fix stream test.
2014-11-10 15:29:19 +00:00
Erik Johnston
3791b75000
Fix a couple more storage tests
2014-11-05 13:48:36 +00:00
Erik Johnston
dcc1965bfe
Test that prev_content get's added if there is a prev_state key (in the event stream).
2014-09-19 16:44:16 +01:00
Erik Johnston
28bcd01e8d
SYN-47: Fix bug where we still returned events for rooms we had left.
...
SYN-47 #resolve
2014-09-19 14:45:21 +01:00