diff --git a/src/Server.ts b/src/Server.ts index 4639d4c..ab70028 100644 --- a/src/Server.ts +++ b/src/Server.ts @@ -267,6 +267,9 @@ export class IRCServer { case 'm.room.redaction': this.handleMatrixRedaction(nextEvent, targetChannel); break; + case 'm.room.tombstone': + this.handleMatrixTombstone(nextEvent,targetChannel); + break; case 'm.room.topic': this.handleMatrixTopic(nextEvent, targetChannel); break; @@ -600,6 +603,14 @@ export class IRCServer { } } + handleMatrixTombstone(event: any, targetChannel: Channel) { + const newRoom = event["content"]?.["replacement_room"]; + if (!newRoom) + return + const message = `This room has been replaced by ${newRoom}, please join that room using another client` + this.client.sendMessage(this.name, 'NOTICE', [targetChannel.name, message], new Map()); + } + handleMatrixTopic(event: any, targetChannel: Channel) { const topicText = event["content"]?.["topic"]; if (!topicText)