Commit graph

1009 commits

Author SHA1 Message Date
Nyaaori 7d2b22f58d
refactor: prepare splitting src/service/rooms/state.rs to src/service/rooms/state_accessor/mod.rs 2022-08-15 17:08:33 +02:00
Nyaaori 9efd9f06c6
refactor: prepare splitting src/service/rooms/state.rs to src/service/rooms/state/data.rs 2022-08-15 17:07:33 +02:00
Nyaaori d0cbe46ff0
refactor: prepare splitting src/service/rooms/state.rs to src/service/rooms/state/mod.rs 2022-08-15 17:07:33 +02:00
Timo Kösters 025b64befc
refactor: renames and split room.rs 2022-08-15 16:30:34 +02:00
Nyaaori 92e59f14e0
refactor: Preparation commit to split src/database/rooms.rs 2022-08-15 16:25:38 +02:00
Nyaaori 7989c7cdda
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/timeline.rs 2022-08-15 16:22:38 +02:00
Nyaaori e22f5fef1f
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/user.rs 2022-08-15 16:22:38 +02:00
Nyaaori 64a022a4d2
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/state.rs 2022-08-15 16:22:37 +02:00
Nyaaori 751be39376
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/state_cache.rs 2022-08-15 16:22:37 +02:00
Nyaaori d05b84d0f5
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/state_compressor.rs 2022-08-15 16:22:37 +02:00
Nyaaori 54bf91b76e
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/outlier.rs 2022-08-15 16:22:36 +02:00
Nyaaori 8ed79a00fd
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/pdu_metadata.rs 2022-08-15 16:22:36 +02:00
Nyaaori 8dffdadfd3
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/search.rs 2022-08-15 16:22:36 +02:00
Nyaaori 2dbfbd45a2
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/short.rs 2022-08-15 16:22:36 +02:00
Nyaaori 249440115b
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/lazy_loading.rs 2022-08-15 16:22:35 +02:00
Nyaaori baa8224cce
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/metadata.rs 2022-08-15 16:22:35 +02:00
Nyaaori bd7b49b098
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/mod.rs 2022-08-15 16:22:35 +02:00
Nyaaori 27e2f0d545
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/alias.rs 2022-08-15 16:22:34 +02:00
Nyaaori 4dc14e1580
refactor: prepare splitting src/database/rooms.rs to src/service/rooms/directory.rs 2022-08-15 16:22:34 +02:00
Zeyphros 1c31f7905f
Update command comment to coincide with the default action 2022-06-19 18:59:49 +02:00
Zeyphros f6183e457d
Implement command to deactivate user from admin channel
Use `leave_room` in `leave_all_rooms`

WIP: Add command to delete a list of users
also implements a flag to prevent the user from being removed from their joined rooms.

Report user deactivation failure reason

Don't send leave events by default when mass deactivating user accounts

Don't stop leaving rooms if an error was encountered

WIP: Rename command, make flags consistent, don't deactivate admin accounts.
Accounts should be deactivated as fast as possible and removing users from joined groups is completed afterwards.

Fix admin safety logic, improve command output

Continue leaving rooms if a room_id is invalid

Ignore errors from leave_room

Add notice to the list-local-users command
Output form list-local-users can be used directly without modification with the deactivate-all command

Only get mutex lock for admin room when sending message
2022-06-19 18:59:48 +02:00
Dietrich 7bee9c1c69 Length of passwords consistently use the constant 2022-06-19 07:10:47 +02:00
Timo Kösters 0bc03e90a1
improvement: make more things async 2022-06-18 22:55:37 +02:00
Timo Kösters 9b898248c7
feat: more admin commands, better logging 2022-06-18 22:55:34 +02:00
Timo Kösters f8547ecba4 Merge branch 'create-user-command' into 'next'
added a command to the admin bot to create a new user, even with registration disabled

See merge request famedly/conduit!354
2022-06-18 13:08:51 +00:00
Timo Kösters 0286a804f4 Merge branch 'filter-users' into 'next'
Hide users from user directory if they are only in private rooms and they don't share a room

Closes #24

See merge request famedly/conduit!325
2022-06-18 11:17:09 +00:00
Radek Stępień 7239243163 Hide users from user directory if they are only in private rooms and they don't share a room 2022-06-18 11:17:09 +00:00
Timo Kösters 124471199c Merge branch 'registration-without-username' into 'next'
Allow registration without username

Closes #111

See merge request famedly/conduit!340
2022-06-18 11:13:37 +00:00
Radek Stępień 84ec057f6e Allow registration without username 2022-06-18 11:13:37 +00:00
Timo Kösters 84cb0667f3 Merge branch 'to_device-existing-txn-id' into 'next'
feat: if txn id exists in the db, skip the event

See merge request famedly/conduit!353
2022-06-18 11:04:16 +00:00
Jakub Kubík c3924b566b feat: if txn id exists in the db, skip the event 2022-06-18 11:04:16 +00:00
Jakub Doboš 8a63a2cc68 Fix FluffyChat Compatibility 2022-06-15 13:07:07 +00:00
Timo Kösters 39bc84d81c Merge branch 'fix_panic_on_long_message' into 'next'
Don't panic when signing event fails.

Closes #232

See merge request famedly/conduit!343
2022-05-28 20:47:15 +00:00
= bb033fe02a added a command to the admin bot to create a new user, even with registration disabled 2022-05-01 17:49:02 +02:00
Jan Christian Grünhage efe9d5000e enable FedDest doc-test
Doc rendering is exactly as before, but it now actually tests the code
2022-04-14 16:42:11 +02:00
Zeyphros 090d0fe684
Fix typo 2022-04-13 00:08:55 +02:00
Jakub Kubík 729d66aa11
feat: register missing add_backup_keys route 2022-04-10 14:56:43 +02:00
Zeyphros 07a3a6fa9a
Return an error when signing an event fails
Prevents the server from crashing/become unresponsive when overly long
messages are sent
2022-04-08 22:05:13 +02:00
Timo Kösters 00b362b43b
fix: cors warning 2022-04-07 17:09:07 +02:00
Timo Kösters b6b27b66c8
fix: don't allow unjoined users to send typing notifications 2022-04-07 17:07:33 +02:00
Timo Kösters 3573d40027
fix warnings 2022-04-07 17:04:29 +02:00
Timo Kösters e4600ccfef
bump ruma 2022-04-07 17:02:49 +02:00
Timo Kösters 0ae39807a4
Add V9 to list of allowed versions 2022-04-07 16:50:09 +02:00
Timo Kösters 686319e2e3
fix: error handling 2022-04-07 16:50:07 +02:00
Nyaaori d655f4c1be
Cleanup rooms.rs, globals.rs, and pdu.rs 2022-04-07 16:48:37 +02:00
Nyaaori 4b28146ee7
Support room version 3 2022-04-07 16:44:50 +02:00
Nyaaori d8a3b257f2
Enable room version 4 2022-04-07 16:36:27 +02:00
Nyaaori 714873694d
Refactor room version support, add default room version config 2022-04-07 16:35:10 +02:00
Timo Kösters d81216cad7
improvement: preparing for room version 9 2022-04-07 16:26:50 +02:00
Timo Kösters 9e29dc808f Merge branch '198-support-user-password-resets' into 'next'
feat: support user password resets

Closes #198

See merge request famedly/conduit!339
2022-04-07 12:11:55 +00:00
Jakub Kubík ada07de204 feat: support user password resets 2022-04-07 12:11:55 +00:00
Timo Kösters df4c38cb61
fix: remove warnings 2022-04-07 13:22:32 +02:00
Timo Kösters 2808dd2000
Ruma upgrade 2022-04-07 12:58:48 +02:00
Timo Kösters 17ad5f0595
fix: checks for incoming cross signing changes 2022-04-07 12:56:18 +02:00
Timo Kösters b8411ae2fd
refactor: rename endpoints to match ruma 2022-04-07 12:56:17 +02:00
Timo Kösters 566833111c
refactor: small improvements 2022-04-07 12:56:16 +02:00
chenyuqide ee96a03d60
Update ruma 2022-04-07 12:56:16 +02:00
chenyuqide 21bc099ccf
Update ruma 2022-04-07 12:56:12 +02:00
Timo Kösters 1ce03059a0 Merge branch 'next' into 'next'
Fix wrong associated type in OutgoingKind::Appservice

See merge request famedly/conduit!324
2022-04-03 19:48:25 +00:00
Timo Kösters 9ed352d4c0 Merge branch '199-fix-kick-ban-over-federation' into 'next'
fix: fix kick and ban events over federation

Closes #199

See merge request famedly/conduit!338
2022-04-03 17:59:15 +00:00
Jakub Kubík a08c667230
docs: add comments for clarification of recent changes 2022-04-03 19:27:48 +02:00
Jakub Kubík 414c7c40c4
fix: remove our server from the list of servers to send the event PDU to 2022-04-03 19:19:57 +02:00
Jakub Kubík 1712e63e06
fix: fix kick and ban events over federation
Fix the scenario where a MembershipState change event was not sent to the server of a user kicked/banned from a room on a Conduit instance if there were not any other users from that server in the room.
2022-04-03 18:58:45 +02:00
Andrej Kacian 9046223e7f Send PDU to appservice if state_key is their user ID
Fixes #110.
2022-04-01 19:38:38 +02:00
Timo Kösters 0066f20bdd Merge branch 'trailingslash' into 'next'
fix: allow trailing slashes for /state/<type>/ again

See merge request famedly/conduit!336
2022-04-01 14:17:21 +00:00
Timo Kösters a5465dfd3e
fix: allow trailing slashes for /state/<type>/ again 2022-04-01 16:00:04 +02:00
Timo Kösters 8086bee146 Merge branch 'show-config' into 'next'
Add show-config admin command

See merge request famedly/conduit!295
2022-04-01 09:01:00 +00:00
Timo Kösters b11a3b80bc Merge branch 'shutdown-msg' into 'next'
Log caught Ctrl+C or SIGTERM for operator feedback

See merge request famedly/conduit!319
2022-04-01 08:49:28 +00:00
Timo Kösters 554146f46e Merge branch 'notify-admin-room-on-user-register' into 'next'
Notify admin room for user registrations, deactivations and password changes

See merge request famedly/conduit!318
2022-04-01 08:41:51 +00:00
Timo Kösters 7bc84dc971 Merge branch 'jplatte/up-axum' into 'next'
Upgrade axum to 0.5

See merge request famedly/conduit!335
2022-04-01 08:33:22 +00:00
Timo Kösters d89141100c Merge branch 'insensitive-login' into 'next'
Case insensitive username login

Closes #248

See merge request famedly/conduit!323
2022-04-01 08:20:45 +00:00
Jonas Platte db0659cb3d
Upgrade axum to 0.5 2022-03-31 22:50:17 +02:00
LordMZTE 4a12a7cbc8
Fix crash when a bad user ID is in the database
To my understanding, a bad user ID can sometimes make it into the
database, which lead to a panic prior to this change.
2022-03-31 20:59:59 +02:00
Andrej Kacian b5b8181851 Notify admin room for user registrations, deactivations and password changes 2022-03-13 09:13:45 +01:00
chenyuqide 5695121f38 Fix wrong associated type in OutgoingKind::Appservice 2022-03-02 23:48:01 +08:00
reti4 8bafdc4623 fixed location of lowercase fn 2022-03-02 02:25:15 +00:00
reti4 9385ea0e7c fmt fix 2022-03-01 21:23:34 +00:00
reti4 9f059ad4c3 make username login case insensitive 2022-03-01 21:03:55 +00:00
Andrej Kacian 65fa4b2ca4 Fix proxy config examples in config/proxy.rs 2022-02-22 22:32:38 +01:00
Andrej Kacian 3b2b35aab7 Log caught Ctrl+C or SIGTERM for operator feedback 2022-02-22 00:28:46 +01:00
Andrej Kacian 196c83939c Add show-config admin room command 2022-02-21 22:27:19 +01:00
Jonathan de Jong 557d119bee change search_events_v3 to search_events::v3 2022-02-18 19:54:26 +01:00
Jonathan de Jong e9f87e1952 update ruma 2022-02-18 15:33:14 +01:00
Timo Kösters b8eaa3be85 Merge branch 'redactfix' into 'next'
Redaction fix

Closes #235

See merge request famedly/conduit!298
2022-02-18 12:00:40 +00:00
Jonas Platte 27692a2f14
Remove useless serde roundtrips 2022-02-18 11:52:00 +01:00
Timo Kösters 6602f6114c
fix: redacts can't error anymore 2022-02-13 15:47:58 +01:00
Jonas Platte 3aece38e9d
Add a not-found route 2022-02-13 13:59:27 +01:00
Jonas Platte aee6bf7e7a Change this to handler 2022-02-13 11:30:04 +00:00
Jonathan de Jong b8d92d3cec take advantage of multiple paths 2022-02-13 12:07:00 +01:00
Timo Kösters 0c4b42ac13 Merge branch 'parse-pdu-command-panic' into 'next'
fix: do not panic on a JSON not containing the PDU

Closes #236

See merge request famedly/conduit!304
2022-02-12 21:22:37 +00:00
M0dEx d4217007fe
fix: do not panic on a JSON not containing the PDU
Do not panic on a JSON not containing the PDU when executing the parse-pdu admin command.
2022-02-12 21:40:07 +01:00
Jonathan de Jong 35b82d51cf fix compilations 2022-02-12 21:04:38 +01:00
Timo Kösters 2b644ef7b7 Merge branch 'tracing-cleanup' into 'next'
Remove unnecessary tracing::instrument attributes

See merge request famedly/conduit!302
2022-02-12 15:50:24 +00:00
Jonas Platte 0ad6eac4f8
Remove all tracing::instrument attributes from database::abstraction::* 2022-02-12 16:38:47 +01:00
Jonas Platte accdb77315
Clean up tracing::instrument attributes
Remove it from request handler since there's already the context of the
request path, added through TraceLayer.
2022-02-12 16:38:47 +01:00
Timo Kösters 914152fcbd Merge branch 'syncfast' into 'next'
improvement: faster /syncs

Closes #231

See merge request famedly/conduit!297
2022-02-12 15:11:03 +00:00
Timo Kösters 2a00c547a1
improvement: faster /syncs 2022-02-12 15:57:54 +01:00
Jonas Platte adeb8ee425
Remove no-op conversions 2022-02-12 15:03:07 +01:00
Jonas Platte d74074ad53
Remove tracing::instrument attribute from util functions
They don't ever log anything, so the extra context is never used.
2022-02-12 15:01:28 +01:00
Timo Kösters 0565b5a6c8 Merge branch 'show-dns-setup-error' into 'next'
Display actual error message from TokioAsyncResolver, if any

See merge request famedly/conduit!296
2022-02-12 13:01:41 +00:00