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) { |     if (rooms.isNotEmpty) { | ||||||
|       final profileSet = <Profile>{}; |       final profileSet = <Profile>{}; | ||||||
|       for (final room in rooms) { |       for (final room in rooms) { | ||||||
|         final user = room.getUserByMXIDSync(userID!); |         final user = await room.requestUser(userID!); | ||||||
|         profileSet.add(Profile( |         if (user != null) { | ||||||
|           avatarUrl: user.avatarUrl, |           profileSet.add(Profile( | ||||||
|           displayName: user.displayName, |             avatarUrl: user.avatarUrl, | ||||||
|           userId: user.id, |             displayName: user.displayName, | ||||||
|         )); |             userId: user.id, | ||||||
|  |           )); | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|       if (profileSet.length == 1) return profileSet.single; |       if (profileSet.length == 1) return profileSet.single; | ||||||
|     } |     } | ||||||
|  |  | ||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
		Reference in New Issue