refactor: align room mention labels with link rendering

This commit is contained in:
2026-04-08 14:51:26 +05:30
parent 67113f96bf
commit 0c40be9cfc
5 changed files with 85 additions and 30 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import type {NodeViewRendererProps} from "@tiptap/core"
import {displayRelayUrl} from "@welshman/util"
import {deriveRoom} from "@app/core/state"
export const RoomReferenceNodeView = ({node}: NodeViewRendererProps) => {
@@ -10,7 +11,7 @@ export const RoomReferenceNodeView = ({node}: NodeViewRendererProps) => {
dom.classList.add("tiptap-object")
const unsubRoom = room.subscribe($room => {
dom.textContent = `~${$room.name || h}`
dom.textContent = `~${displayRelayUrl(url)} / ${$room.name || h}`
})
return {