mirror of
				https://gitlab.com/famedly/fluffychat.git
				synced 2025-10-30 19:47:23 +01:00 
			
		
		
		
	fix: cast error in html messages
This commit is contained in:
		
							parent
							
								
									7da6b32975
								
							
						
					
					
						commit
						b77d1bbc1d
					
				| @ -95,7 +95,7 @@ class HtmlMessage extends StatelessWidget { | ||||
|         final identityParts = url.parseIdentifierIntoParts(); | ||||
|         final identifier = identityParts?.primaryIdentifier; | ||||
|         if (identifier == null) { | ||||
|           return null; | ||||
|           return {'': null}; | ||||
|         } | ||||
|         if (identifier.sigil == '@') { | ||||
|           // we have a user pill | ||||
| @ -127,13 +127,13 @@ class HtmlMessage extends StatelessWidget { | ||||
|               }; | ||||
|             } | ||||
|           } | ||||
|           return null; | ||||
|           return {'': null}; | ||||
|         } | ||||
|         if (identifier.sigil == '!') { | ||||
|           // we have a room ID pill | ||||
|           final r = room.client.getRoomById(identifier); | ||||
|           if (r == null) { | ||||
|             return null; | ||||
|             return {'': null}; | ||||
|           } | ||||
|           return { | ||||
|             'displayname': | ||||
| @ -141,8 +141,8 @@ class HtmlMessage extends StatelessWidget { | ||||
|             'avatar_url': r.getState('m.room.avatar')?.content['url'], | ||||
|           }; | ||||
|         } | ||||
|         return null; | ||||
|       } as Future<Map<String, dynamic>> Function(String)?, | ||||
|         return {'': null}; | ||||
|       }, | ||||
|     ); | ||||
|   } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jayesh Nirve
						Jayesh Nirve