fix(server): canonicalize spaceInstanceOrigin before storing payload

Empty-string (local) origin is now stored as the absolute home origin
so relayed DM space-invite cards carry the correct value to remote
recipients instead of resolving against the wrong instance.
This commit is contained in:
Jannis Braun
2026-04-29 22:35:34 +02:00
parent 44e9a4234c
commit bc66ddc633
2 changed files with 37 additions and 1 deletions
+1 -1
View File
@@ -1757,7 +1757,7 @@ export async function dmRoutes(app: FastifyInstance): Promise<void> {
const payload: SpaceInviteSystemPayload = {
event: 'space_invite',
spaceId: body.spaceId,
spaceInstanceOrigin: body.spaceInstanceOrigin,
spaceInstanceOrigin: spaceOrigin,
inviteCode: body.inviteCode,
snapshot: {
spaceName: snapshot.spaceName,