Make "share this room" use aliases if possible
Signed-off-by: Aaron Raimist <aaron@raim.ist>pull/21833/head
							parent
							
								
									53ebf3b8e3
								
							
						
					
					
						commit
						ccdd2311f4
					
				|  | @ -293,16 +293,16 @@ export function makeRoomPermalink(roomId: string): string { | |||
| 
 | ||||
|     // If the roomId isn't actually a room ID, don't try to list the servers.
 | ||||
|     // Aliases are already routable, and don't need extra information.
 | ||||
|     if (roomId[0] !== '!') return getPermalinkConstructor().forRoom(roomId, []); | ||||
|     if (roomId[0] !== '!') return getPermalinkConstructor().forShareableRoom(roomId, []); | ||||
| 
 | ||||
|     const client = MatrixClientPeg.get(); | ||||
|     const room = client.getRoom(roomId); | ||||
|     if (!room) { | ||||
|         return getPermalinkConstructor().forRoom(roomId, []); | ||||
|         return getPermalinkConstructor().forShareableRoom(roomId, []); | ||||
|     } | ||||
|     const permalinkCreator = new RoomPermalinkCreator(room); | ||||
|     permalinkCreator.load(); | ||||
|     return permalinkCreator.forRoom(); | ||||
|     return permalinkCreator.forShareableRoom(); | ||||
| } | ||||
| 
 | ||||
| export function makeGroupPermalink(groupId: string): string { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Aaron Raimist
						Aaron Raimist