[Servatrice] Relay room channel messages over ISL (#7480)

* [Servatrice] Relay room channel messages over ISL

* [Servatrice] Skip audit log for unknown ISL channel per review

- externalRoomSay drops messages for channels not in the local
  catalog, matching Server_Room::say, instead of logging what was
  never delivered

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-10-16 22:46:40 +02:00 • committed by GitHub
parent ce51e7147d
commit 155f7b0143
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 34 additions and 9 deletions

View file

@ -36,6 +36,7 @@
#include <libcockatrice/protocol/pb/event_leave_room.pb.h>
#include <libcockatrice/protocol/pb/event_list_games.pb.h>
#include <libcockatrice/protocol/pb/event_remove_messages.pb.h>
#include <libcockatrice/protocol/pb/event_room_channel_say.pb.h>
#include <libcockatrice/protocol/pb/event_room_say.pb.h>
#include <libcockatrice/protocol/pb/event_server_complete_list.pb.h>
#include <libcockatrice/protocol/pb/event_user_joined.pb.h>
@ -383,7 +384,14 @@ void IslInterface::roomEvent_UserLeft(int roomId, const Event_LeaveRoom &event)
void IslInterface::roomEvent_Say(int roomId, const Event_RoomSay &event)
{
emit externalRoomSay(roomId, QString::fromStdString(event.name()), QString::fromStdString(event.message()));
emit externalRoomSay(roomId, QString::fromStdString(event.name()), QString::fromStdString(event.message()),
QString());
}
void IslInterface::roomEvent_ChannelSay(int roomId, const Event_RoomChannelSay &event)
{
emit externalRoomSay(roomId, QString::fromStdString(event.name()), QString::fromStdString(event.message()),
QString::fromStdString(event.channel_id()));
}
void IslInterface::roomEvent_ListGames(int roomId, const Event_ListGames &event)
@ -459,6 +467,9 @@ void IslInterface::processRoomEvent(const RoomEvent &event)
case RoomEvent::ROOM_SAY:
roomEvent_Say(event.room_id(), event.GetExtension(Event_RoomSay::ext));
break;
case RoomEvent::ROOM_CHANNEL_SAY:
roomEvent_ChannelSay(event.room_id(), event.GetExtension(Event_RoomChannelSay::ext));
break;
case RoomEvent::LIST_GAMES:
roomEvent_ListGames(event.room_id(), event.GetExtension(Event_ListGames::ext));
break;