Fix invalid matrix.to event link generation (#2717)

This commit is contained in:
Tulir Asokan 2026-03-03 11:12:45 +02:00 committed by GitHub
commit e0d5c63dc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View file

@ -16,11 +16,11 @@ export const getMatrixToRoom = (roomIdOrAlias: string, viaServers?: string[]): s
};
export const getMatrixToRoomEvent = (
roomIdOrAlias: string,
roomId: string,
eventId: string,
viaServers?: string[]
): string => {
let fragment = `${roomIdOrAlias}/${eventId}`;
let fragment = `${roomId}/${eventId}`;
if (Array.isArray(viaServers) && viaServers.length > 0) {
fragment = withViaServers(fragment, viaServers);