* fix: add reconnection policy to Redis subscriber to prevent ghost state
- Add ReconnectPolicy::new_exponential(0, 100, 30_000, 2) to the subscriber builder, unlimited retries with exponential backoff (100ms min, 30s max)
- Add on_reconnect handler that signals the listener loop to force a subscription reset, re-subscribing to all topics on the new connection
- Add warn-level logging to on_error for all Redis subscriber errors (previously only Canceled was handled, others were silently ignored)
Signed-off-by: Infiland <ljubica.citydesign@gmail.com>
* Update websocket.rs
Signed-off-by: Infiland <88491175+Infiland@users.noreply.github.com>
* Auto-manage subscriptions on reconnect
Call subscriber.manage_subscriptions() so the subscriber will automatically re-subscribe tracked channels after a Redis reconnect. Remove the manual reconnect channel and on_reconnect handler along with the select branch that forced SubscriptionStateChange::Reset.
Signed-off-by: Infiland <88491175+Infiland@users.noreply.github.com>
---------
Signed-off-by: Infiland <ljubica.citydesign@gmail.com>
Signed-off-by: Infiland <88491175+Infiland@users.noreply.github.com>
* fix: /bots/{bot}
Paths "/bots/{bot}" and "/bots/{target}" must not be equivalent.
Signed-off-by: Damocles078 <hellodamocles078@gmail.com>
* fix: /channels/{group_id}/recipients/{member_id}
Paths "/channels/{group_id}/recipients/{member_id}" and "/channels/{target}/recipients/{member}" must not be equivalent.
Signed-off-by: Damocles078 <hellodamocles078@gmail.com>
* fix: /channels/{channel_id}/webhook
Paths "/channels/{target}/webhooks" and "/channels/{channel_id}/webhooks" must not be equivalent.
Signed-off-by: Damocles078 <hellodamocles078@gmail.com>
* fix: /servers/{server_id}/members/{member_id}
Paths "/servers/{target}/members/{member}" and "/servers/{server}/members/{member}" must not be equivalent.
Signed-off-by: Damocles078 <hellodamocles078@gmail.com>
* fix: /custom/emoji/{emoji_id}
Paths "/custom/emoji/{id}" and "/custom/emoji/{emoji_id}" must not be equivalent.
Signed-off-by: Damocles078 <hellodamocles078@gmail.com>
---------
Signed-off-by: Damocles078 <hellodamocles078@gmail.com>
Signed-off-by: Damocles <106018783+Damocles078@users.noreply.github.com>
* feat: implement time based message sweep on user ban
- Adds `delete_message_seconds` (0 to 7 days in seconds) to the ban request payload.
Signed-off-by: arsabutispik <ispik@ispik.dev>
* refactor: pass ulid conversion to database
Signed-off-by: arsabutispik <ispik@ispik.dev>
* fix: use COL constant instead of hardcoded string in error mapper
Signed-off-by: arsabutispik <ispik@ispik.dev>
* refactor: broadcast bulk delete events during ban sweep
Updates the `delete_messages_by_author_since` trait to return a
HashMap of deleted message IDs grouped by channel.
The MongoDB implementation now uses a two-step process: it first
runs a projected `find` query to gather the target `_id` and
`channel` fields, then executes the `delete_many` operation.
This allows the ban route to loop through the affected channels and
dispatch `EventV1::BulkMessageDelete` WebSocket events, ensuring
that the swept messages are instantly removed from the UI for
all connected clients.
Signed-off-by: arsabutispik <ispik@ispik.dev>
* refactor: optimize message deletion by using $group and aggregate
Signed-off-by: arsabutispik <ispik@ispik.dev>
* refactor: use with_type in query
Signed-off-by: arsabutispik <ispik@ispik.dev>
* refactor: abstract function to Message model and mark attachments as deleted
Signed-off-by: arsabutispik <ispik@ispik.dev>
---------
Signed-off-by: arsabutispik <ispik@ispik.dev>
Updates user-facing links to point to the new organization. Does not
update references in source code (user-agent, dependency references),
as they should be handled separately.
Signed-off-by: sinus-x <14353790+sinus-x@users.noreply.github.com>
* Implement animated metadata TODOs for database and thumbnailing.
Signed-off-by: Assisting <erik@eriklabine.com>
* Run linter for code changes
Signed-off-by: Assisting <erik@eriklabine.com>
---------
Signed-off-by: Assisting <erik@eriklabine.com>