dendrite/clientapi/routing
John Terzis 40830b8a37 Space,Channel soft deletion with dendrite gating, tests (#889)
Closes HNT-244.

The following PR implements Space,Channel soft deletion using on-chain
`disabled` flag scope to space, channel respectively. On message sync,
dendrite will now gate disabled rooms by performing a leave on the user
attempting to sync unless the user is the owner (more on this later). To
re-join, given rooms (spaces,channels) are created by default using
`invite` membership state, the owner will need to undo the on-chain
`disabled` flag, setting it false then re-invite users that left the
room as a side effect of it becoming disabled previously.

The owner does not leave the space, channel because if they did then
there would be no one left to invite users let alone themselves back in
if the action is ever undone.

What is not implemented in this PR:
1. **Transitive leaves on channels in a space** - If a space is
disabled, users will leave the space but not the channels within the
space. To allow for fully disabling a space and all its' channels, the
client can offer a view to the owner that iterates over the channels and
space to disable all on-chain. Furthermore, we could implement a batch
on-chain method that fully disables all channels within a space (plus
the space) in one on-chain call to save the owner gas.
2. **Data deletion** - No data is remove from the DAGs or on-chain.
Therefore deletion is soft and reversible.
3. **New hook to check if a room is disabled** - the client can leverage
existing on-chain public read only methods `getSpaceInfoBySpaceId`,
`getChannelInfoByChannelId` to read the state of each in order to remove
spaces, channels from a member's view that are disabled.
2022-11-09 17:07:51 -07:00
..
account_data.go Jterzis/update dendrite (#656) 2022-10-17 15:59:47 -07:00
admin.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
admin_whois.go Define component interfaces based on consumers (1/2) (#2423) 2022-05-05 13:17:38 +01:00
aliases.go Handle state before, send history visibility in output (#2532) 2022-06-13 15:11:10 +01:00
auth_fallback.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
capabilities.go Define component interfaces based on consumers (1/2) (#2423) 2022-05-05 13:17:38 +01:00
createroom.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
deactivate.go Implement EIP-4361 sign in with Ethereum (#5) 2022-08-12 18:06:39 -07:00
device.go Implement EIP-4361 sign in with Ethereum (#5) 2022-08-12 18:06:39 -07:00
directory.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
directory_public.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
directory_public_test.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
joined_rooms.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
joinroom.go Generic-based internal HTTP API (#2626) 2022-08-11 15:29:33 +01:00
key_backup.go Generic-based internal HTTP API (#2626) 2022-08-11 15:29:33 +01:00
key_crosssigning.go Generic-based internal HTTP API (#2626) 2022-08-11 15:29:33 +01:00
keys.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
leaveroom.go Define component interfaces based on consumers (1/2) (#2423) 2022-05-05 13:17:38 +01:00
login.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
logout.go Define component interfaces based on consumers (1/2) (#2423) 2022-05-05 13:17:38 +01:00
membership.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
notification.go Define component interfaces based on consumers (1/2) (#2423) 2022-05-05 13:17:38 +01:00
openid.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
password.go Define component interfaces based on consumers (1/2) (#2423) 2022-05-05 13:17:38 +01:00
peekroom.go Generic-based internal HTTP API (#2626) 2022-08-11 15:29:33 +01:00
presence.go Simplify presence stringification (should help with vector-im/element-android#5712) 2022-04-07 10:10:28 +01:00
profile.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
pusher.go Define component interfaces based on consumers (1/2) (#2423) 2022-05-05 13:17:38 +01:00
pushrules.go Define component interfaces based on consumers (1/2) (#2423) 2022-05-05 13:17:38 +01:00
receipt.go Jterzis/update dendrite (#656) 2022-10-17 15:59:47 -07:00
redaction.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
register.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
register_publickey.go Takwaiw/dendrite publickey (#2) 2022-08-12 17:58:23 -07:00
register_publickey_test.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
register_secret.go - Removed double imports (#1989) 2021-09-08 17:31:03 +01:00
register_secret_test.go Do not use ioutil as it is deprecated (#2625) 2022-08-05 10:26:59 +01:00
register_test.go Configuration tweaks (#2567) 2022-09-01 14:15:41 +01:00
room_tagging.go Make the User API responsible for sending account data output events (#2592) 2022-07-25 17:30:07 +01:00
routing.go Space,Channel soft deletion with dendrite gating, tests (#889) 2022-11-09 17:07:51 -07:00
sendevent.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
sendtodevice.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
sendtyping.go Define component interfaces based on consumers (1/2) (#2423) 2022-05-05 13:17:38 +01:00
server_notices.go Sync dendrite fork changes for gating, and single chain support (#778) 2022-11-01 11:09:34 -07:00
server_notices_test.go Implement server notices (#2180) 2022-02-18 16:05:03 +01:00
state.go Add RoomExists flag to QueryMembershipForUser (#2450) 2022-05-11 11:29:23 +01:00
thirdparty.go subtree pull from dendrite fork for fix #2383 (#802) 2022-11-02 16:28:06 -07:00
threepid.go Fix linter issues (#2624) 2022-08-05 11:12:41 +02:00
upgrade_room.go Generic-based internal HTTP API (#2626) 2022-08-11 15:29:33 +01:00
userdirectory.go Show/hide users in user directory (#2637) 2022-08-12 13:33:31 +02:00
voip.go Fix linter issues (#2624) 2022-08-05 11:12:41 +02:00
whoami.go Update /whoami response to match Spec v1.2 (#2201) 2022-02-18 11:28:02 +00:00