mirror of
https://git.sr.ht/~emerson/reflectionircd
synced 2025-08-05 16:59:10 +00:00
Fix channel renaming M->I
This commit is contained in:
parent
8c48d095e5
commit
fbc933ac47
2 changed files with 6 additions and 4 deletions
|
@ -54,7 +54,7 @@ Note that there are no PMs, because Matrix doesn't differentiate between DMs and
|
|||
| Encrypted rooms | ❌ | ❌ | [#20](https://todo.sr.ht/~emerson/reflectionircd/20) |
|
||||
| Rich text | ❌ | ❌ | [#31](https://todo.sr.ht/~emerson/reflectionircd/31) |
|
||||
| Presence | ❌ | ❌ | [#25](https://todo.sr.ht/~emerson/reflectionircd/25) Note that not all homeservers have presence enabled |
|
||||
| Channel renaming <small>(IRCv3)</small> | 🟨 | ❌ | [#29](https://todo.sr.ht/~emerson/reflectionircd/29) [#16](https://todo.sr.ht/~emerson/reflectionircd/16) Only when the canonical alias changes |
|
||||
| Channel renaming <small>(IRCv3)</small> | ✅ | ❌ | [#16](https://todo.sr.ht/~emerson/reflectionircd/16) |
|
||||
| Message replies <small>(IRCv3)</small> | ✅ | ✅ | Clients without support will still receive the reply message, but it won't be marked as a reply |
|
||||
| Message reactions <small>(IRCv3)</small> | ✅ | ✅ | Can't undo reactions yet |
|
||||
| Extended invites <small>(IRCv3)</small> | ✅ | ✅ ||
|
||||
|
|
|
@ -260,9 +260,11 @@ export class IRCUser {
|
|||
}
|
||||
|
||||
updateRoomName(newNameEvent: any, targetChannel: Channel) {
|
||||
const newName: string = newNameEvent["content"]["alias"];
|
||||
if (!newName || newName === targetChannel.name)
|
||||
let newName: string = newNameEvent["content"]["alias"];
|
||||
if (newName === targetChannel.name)
|
||||
return;
|
||||
if (!newName || newName === "")
|
||||
newName = targetChannel.roomId;
|
||||
const oldName = targetChannel.name;
|
||||
this.channels.delete(oldName);
|
||||
targetChannel.name = newName;
|
||||
|
@ -272,7 +274,7 @@ export class IRCUser {
|
|||
client.sendMessage(this.server.name, "RENAME", [oldName, targetChannel.name, "New channel name set"], new Map());
|
||||
}
|
||||
else {
|
||||
client.sendMessage(this.server.name, "PART", [oldName, "Renaming channel"], new Map());
|
||||
client.sendMessage(this.getMask(), "PART", [oldName, `Renaming channel to ${newName}`], new Map());
|
||||
this.joinNewIRCClient(client, targetChannel);
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue