Add call actions

This commit is contained in:
ismailgulek
2021-03-12 04:04:23 +03:00
parent 5f573eb5b4
commit ba6a9e8ef1
3 changed files with 32 additions and 0 deletions
+16
View File
@@ -2390,6 +2390,22 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo
[self roomInputToolbarView:self.inputToolbarView placeCallWithVideo2:eventContent.isVideoCall];
}
else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellCallDeclineButtonPressed])
{
MXEvent *callInviteEvent = userInfo[kMXKRoomBubbleCellEventKey];
MXCallInviteEventContent *eventContent = [MXCallInviteEventContent modelFromJSON:callInviteEvent.content];
MXCall *call = [self.mainSession.callManager callWithCallId:eventContent.callId];
[call hangup];
}
else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellCallAnswerButtonPressed])
{
MXEvent *callInviteEvent = userInfo[kMXKRoomBubbleCellEventKey];
MXCallInviteEventContent *eventContent = [MXCallInviteEventContent modelFromJSON:callInviteEvent.content];
MXCall *call = [self.mainSession.callManager callWithCallId:eventContent.callId];
[call answer];
}
else if ([actionIdentifier isEqualToString:RoomCreationIntroCell.tapOnAvatarView])
{
[self showRoomAvatarChange];