feat(presence): add granular allow configuration

This commit is contained in:
Jakub Kubík 2023-09-08 14:36:39 +02:00 committed by girlbossceo
parent ba03edfae9
commit 58a83f06b1
9 changed files with 133 additions and 98 deletions

View file

@ -839,6 +839,10 @@ pub async fn send_transaction_message_route(
{
match edu {
Edu::Presence(presence) => {
if !services().globals.allow_incoming_presence() {
continue;
}
for update in presence.push {
for room_id in services().rooms.state_cache.rooms_joined(&update.user_id) {
services().rooms.edus.presence.set_presence(