mirror of
				https://github.com/cinnyapp/cinny.git
				synced 2025-11-04 06:20:28 +03:00 
			
		
		
		
	fix room not opening when two rooms has same alias (#2387)
This commit is contained in:
		
							parent
							
								
									c757b8967f
								
							
						
					
					
						commit
						6b81401e2d
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -50,7 +50,11 @@ export const getCanonicalAliasOrRoomId = (mx: MatrixClient, roomId: string): str
 | 
			
		|||
  const room = mx.getRoom(roomId);
 | 
			
		||||
  if (!room) return roomId;
 | 
			
		||||
  if (getStateEvent(room, StateEvent.RoomTombstone) !== undefined) return roomId;
 | 
			
		||||
  return room.getCanonicalAlias() || roomId;
 | 
			
		||||
  const alias = room.getCanonicalAlias();
 | 
			
		||||
  if (alias && getCanonicalAliasRoomId(mx, alias) === roomId) {
 | 
			
		||||
    return alias;
 | 
			
		||||
  }
 | 
			
		||||
  return roomId;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const getImageInfo = (img: HTMLImageElement, fileOrBlob: File | Blob): IImageInfo => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue