mirror of
https://git.sr.ht/~emerson/reflectionircd
synced 2025-04-13 09:59:52 +00:00
support tombstones
This commit is contained in:
parent
5b32104a1a
commit
550f8a4dd5
1 changed files with 11 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue