Update OneToOne room handling (see [MXSession privateOneToOneRoomWithUserId:]).

This commit is contained in:
giomfo
2015-05-04 14:22:39 +02:00
parent 216f7d1cf9
commit 69c90c9c95
3 changed files with 5 additions and 41 deletions
@@ -328,8 +328,8 @@
// offer to start a new chat only if the room is not a 1:1 room with this user
// it does not make sense : it would open the same room
NSString* roomId = [mxHandler privateOneToOneRoomIdWithUserId:_mxRoomMember.userId];
if (![roomId isEqualToString:mxRoom.state.roomId]) {
MXRoom* room = [self.mxSession privateOneToOneRoomWithUserId:_mxRoomMember.userId];
if (!room || (![room.state.roomId isEqualToString:mxRoom.state.roomId])) {
[buttonsTitles addObject:@"Start Chat"];
}
}