Display a message when attempting to launch cancelled conference from history

This commit is contained in:
Christophe Deschamps 2022-09-19 15:17:37 +02:00
parent 2b252a04ff
commit cf78ae8ff9
2 changed files with 18 additions and 1 deletions

View file

@ -268,8 +268,10 @@
} else {
if (linphone_call_log_was_conference(callLog)) {
LinphoneConferenceInfo *confInfo = linphone_call_log_get_conference_info(callLog);
if (linphone_conference_info_get_state(confInfo) == LinphoneConferenceInfoStateCancelled)
if (linphone_conference_info_get_state(confInfo) == LinphoneConferenceInfoStateCancelled) {
[ConferenceViewModelBridge showCancelledMeetingWithCConferenceInfo:confInfo];
return;
}
ConferenceWaitingRoomFragment *view = VIEW(ConferenceWaitingRoomFragment);
[view setDetailsWithSubject:[NSString stringWithUTF8String:linphone_conference_info_get_subject(confInfo)] url:[NSString stringWithUTF8String:linphone_address_as_string(linphone_conference_info_get_uri(confInfo))]];
[PhoneMainView.instance changeCurrentView:ConferenceWaitingRoomFragment.compositeViewDescription];

View file

@ -477,6 +477,21 @@ class ConferenceViewModel {
ConferenceViewModel.shared.conferenceScheduler?.info = conferenceInfo // Will trigger the conference creation automatically
}
@objc static func showCancelledMeeting(cConferenceInfo: OpaquePointer) {
let core = Core.get()
var message = VoipTexts.conference_scheduled_cancelled_by_organizer
let conferenceInfo = ConferenceInfo.getSwiftObject(cObject: cConferenceInfo)
if let organizerAddress = conferenceInfo.organizer {
let localAccount = Core.get().accountList.filter { account in
account.params?.identityAddress != nil && organizerAddress.weakEqual(address2: account.params!.identityAddress!)
}.first
if (localAccount != nil) {
message = VoipTexts.conference_scheduled_cancelled_by_me
}
}
VoipDialog.toast(message: message)
}
}