mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-01 05:36:57 +02:00
Room preview: Show members count
This commit is contained in:
@@ -48,22 +48,17 @@
|
||||
// Make an /initialSync request to get preview data
|
||||
[_mxSession.matrixRestClient initialSyncOfRoom:_roomId withLimit:0 success:^(MXRoomInitialSync *roomInitialSync) {
|
||||
|
||||
MXRoomState *roomState = [[MXRoomState alloc] initWithRoomId:_roomId andMatrixSession:_mxSession andDirection:YES];
|
||||
_roomState = [[MXRoomState alloc] initWithRoomId:_roomId andMatrixSession:_mxSession andDirection:YES];
|
||||
|
||||
// Make roomState digest state events of the room
|
||||
for (MXEvent *stateEvent in roomInitialSync.state)
|
||||
{
|
||||
// Skip members events as they are not not interesting here and can be numerous
|
||||
if (stateEvent.eventType != MXEventTypeRoomMember)
|
||||
{
|
||||
[roomState handleStateEvent:stateEvent];
|
||||
}
|
||||
[_roomState handleStateEvent:stateEvent];
|
||||
}
|
||||
|
||||
// Report retrieved data
|
||||
_roomName = roomState.displayname;
|
||||
_roomAvatarUrl = roomState.avatar;
|
||||
_roomTopic = roomState.topic;
|
||||
_roomName = _roomState.displayname;
|
||||
_roomAvatarUrl = _roomState.avatar;
|
||||
|
||||
completion(YES);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user