Merge branch 'nico/fix-profile' into 'main'
fix: own profile containing mxid Closes frontend-issue-inbox#65 See merge request famedly/company/frontend/famedlysdk!975
This commit is contained in:
		
						commit
						8c8ab5e39a
					
				|  | @ -675,12 +675,14 @@ class Client extends MatrixApi { | |||
|     if (rooms.isNotEmpty) { | ||||
|       final profileSet = <Profile>{}; | ||||
|       for (final room in rooms) { | ||||
|         final user = room.getUserByMXIDSync(userID!); | ||||
|         profileSet.add(Profile( | ||||
|           avatarUrl: user.avatarUrl, | ||||
|           displayName: user.displayName, | ||||
|           userId: user.id, | ||||
|         )); | ||||
|         final user = await room.requestUser(userID!); | ||||
|         if (user != null) { | ||||
|           profileSet.add(Profile( | ||||
|             avatarUrl: user.avatarUrl, | ||||
|             displayName: user.displayName, | ||||
|             userId: user.id, | ||||
|           )); | ||||
|         } | ||||
|       } | ||||
|       if (profileSet.length == 1) return profileSet.single; | ||||
|     } | ||||
|  |  | |||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
		Reference in New Issue