Use same invite logic for display and for linking

This commit is contained in:
Cadence Ember
2026-02-14 00:33:02 +13:00
parent 08323f4512
commit b5143bfe1f
3 changed files with 22 additions and 10 deletions
-1
View File
@@ -844,7 +844,6 @@ async function eventToMessage(event, guild, channel, di) {
// The matrix spec hasn't decided whether \n counts as a newline or not, but I'm going to count it, because if it's in the data it's there for a reason.
// But I should not count it if it's between block elements.
input = input.replace(/(<\/?([^ >]+)[^>]*>)?\n(<\/?([^ >]+)[^>]*>)?/g, (whole, beforeContext, beforeTag, afterContext, afterTag) => {
// console.error(beforeContext, beforeTag, afterContext, afterTag)
if (typeof beforeTag !== "string" && typeof afterTag !== "string") {
return "<br>"
}