Code coverage for unknown channel mention

This commit is contained in:
Cadence Ember 2024-01-19 12:37:13 +13:00
commit d02f86b342
3 changed files with 52 additions and 1 deletions

View file

@ -43,7 +43,7 @@ function getDiscordParseCallbacks(message, guild, useHTML) {
channel: node => {
const row = select("channel_room", ["room_id", "name", "nick"], {channel_id: node.id}).get()
if (!row) {
return `<#${node.id}>` // fallback for when this channel is not bridged
return `#[channel-from-an-unknown-server]` // fallback for when this channel is not bridged
} else if (useHTML) {
return `<a href="https://matrix.to/#/${row.room_id}">#${row.nick || row.name}</a>`
} else {