mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Conference calls
This commit is contained in:
@@ -718,6 +718,23 @@ private final class CallSessionManagerContext {
|
||||
}
|
||||
}
|
||||
|
||||
func dropOutgoingConferenceRequest(messageId: MessageId) {
|
||||
let addUpdates = self.addUpdates
|
||||
let rejectSignal = self.network.request(Api.functions.phone.declineConferenceCallInvite(msgId: messageId.id))
|
||||
|> map(Optional.init)
|
||||
|> `catch` { _ -> Signal<Api.Updates?, NoError> in
|
||||
return .single(nil)
|
||||
}
|
||||
|> mapToSignal { updates -> Signal<Never, NoError> in
|
||||
if let updates {
|
||||
addUpdates(updates)
|
||||
}
|
||||
return .complete()
|
||||
}
|
||||
|
||||
self.rejectConferenceInvitationDisposables.add(rejectSignal.startStrict())
|
||||
}
|
||||
|
||||
func drop(internalId: CallSessionInternalId, reason: DropCallReason, debugLog: Signal<String?, NoError>) {
|
||||
for (id, context) in self.incomingConferenceInvitationContexts {
|
||||
if context.internalId == internalId {
|
||||
@@ -1383,6 +1400,12 @@ public final class CallSessionManager {
|
||||
}
|
||||
}
|
||||
|
||||
public func dropOutgoingConferenceRequest(messageId: MessageId) {
|
||||
self.withContext { context in
|
||||
context.dropOutgoingConferenceRequest(messageId: messageId)
|
||||
}
|
||||
}
|
||||
|
||||
func drop(stableId: CallSessionStableId, reason: DropCallReason) {
|
||||
self.withContext { context in
|
||||
context.drop(stableId: stableId, reason: reason)
|
||||
|
||||
Reference in New Issue
Block a user