Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit b1acb30

Browse files
committed
Remove groups replication code.
1 parent e541bb9 commit b1acb30

File tree

7 files changed

+1
-90
lines changed

7 files changed

+1
-90
lines changed

changelog.d/12900.removal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove support for the non-standard groups/communities feature from Synapse.

synapse/app/admin_cmd.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
from synapse.replication.slave.storage.devices import SlavedDeviceStore
3838
from synapse.replication.slave.storage.events import SlavedEventStore
3939
from synapse.replication.slave.storage.filtering import SlavedFilteringStore
40-
from synapse.replication.slave.storage.groups import SlavedGroupServerStore
4140
from synapse.replication.slave.storage.push_rule import SlavedPushRuleStore
4241
from synapse.replication.slave.storage.receipts import SlavedReceiptsStore
4342
from synapse.replication.slave.storage.registration import SlavedRegistrationStore
@@ -55,7 +54,6 @@ class AdminCmdSlavedStore(
5554
SlavedApplicationServiceStore,
5655
SlavedRegistrationStore,
5756
SlavedFilteringStore,
58-
SlavedGroupServerStore,
5957
SlavedDeviceInboxStore,
6058
SlavedDeviceStore,
6159
SlavedPushRuleStore,

synapse/app/generic_worker.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
from synapse.replication.slave.storage.directory import DirectoryStore
5959
from synapse.replication.slave.storage.events import SlavedEventStore
6060
from synapse.replication.slave.storage.filtering import SlavedFilteringStore
61-
from synapse.replication.slave.storage.groups import SlavedGroupServerStore
6261
from synapse.replication.slave.storage.keys import SlavedKeyStore
6362
from synapse.replication.slave.storage.profile import SlavedProfileStore
6463
from synapse.replication.slave.storage.push_rule import SlavedPushRuleStore
@@ -233,7 +232,6 @@ class GenericWorkerSlavedStore(
233232
SlavedDeviceStore,
234233
SlavedReceiptsStore,
235234
SlavedPushRuleStore,
236-
SlavedGroupServerStore,
237235
SlavedAccountDataStore,
238236
SlavedPusherStore,
239237
CensorEventsStore,

synapse/replication/slave/storage/groups.py

Lines changed: 0 additions & 58 deletions
This file was deleted.

synapse/replication/tcp/client.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
from synapse.replication.tcp.streams import (
3131
AccountDataStream,
3232
DeviceListsStream,
33-
GroupServerStream,
3433
PushersStream,
3534
PushRulesStream,
3635
ReceiptsStream,
@@ -185,10 +184,6 @@ async def on_rdata(
185184
self.notifier.on_new_event(
186185
StreamKeyType.DEVICE_LIST, token, rooms=all_room_ids
187186
)
188-
elif stream_name == GroupServerStream.NAME:
189-
self.notifier.on_new_event(
190-
"groups_key", token, users=[row.user_id for row in rows]
191-
)
192187
elif stream_name == PushersStream.NAME:
193188
for row in rows:
194189
if row.deleted:

synapse/replication/tcp/streams/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
BackfillStream,
3030
CachesStream,
3131
DeviceListsStream,
32-
GroupServerStream,
3332
PresenceFederationStream,
3433
PresenceStream,
3534
PushersStream,
@@ -61,7 +60,6 @@
6160
FederationStream,
6261
TagAccountDataStream,
6362
AccountDataStream,
64-
GroupServerStream,
6563
UserSignatureStream,
6664
)
6765
}
@@ -81,6 +79,5 @@
8179
"ToDeviceStream",
8280
"TagAccountDataStream",
8381
"AccountDataStream",
84-
"GroupServerStream",
8582
"UserSignatureStream",
8683
]

synapse/replication/tcp/streams/_base.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -585,26 +585,6 @@ async def _update_function(
585585
return updates, to_token, limited
586586

587587

588-
class GroupServerStream(Stream):
589-
@attr.s(slots=True, frozen=True, auto_attribs=True)
590-
class GroupsStreamRow:
591-
group_id: str
592-
user_id: str
593-
type: str
594-
content: JsonDict
595-
596-
NAME = "groups"
597-
ROW_TYPE = GroupsStreamRow
598-
599-
def __init__(self, hs: "HomeServer"):
600-
store = hs.get_datastores().main
601-
super().__init__(
602-
hs.get_instance_name(),
603-
current_token_without_instance(store.get_group_stream_token),
604-
store.get_all_groups_changes,
605-
)
606-
607-
608588
class UserSignatureStream(Stream):
609589
"""A user has signed their own device with their user-signing key"""
610590

0 commit comments

Comments
 (0)