Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion NextcloudTalk/Calls/NCCallController.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#import "NCDatabaseManager.h"
#import "NCSettingsController.h"
#import "NCSignalingController.h"
#import "NCExternalSignalingController.h"
#import "NCScreensharingController.h"

#import "NextcloudTalk-Swift.h"
Expand Down
30 changes: 15 additions & 15 deletions NextcloudTalk/Chat/BaseChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1321,9 +1321,11 @@ import SwiftUI
}

if let signalingController = NCSettingsController.sharedInstance().externalSignalingController(forAccountId: self.room.accountId) {
let mySessionId = signalingController.sessionId()
let message = NCStartedTypingMessage(from: mySessionId, sendTo: sessionId, withPayload: [:], forRoomType: "")
signalingController.sendCall(message)
let mySessionId = signalingController.sessionId

if let message = NCStartedTypingMessage(from: mySessionId, sendTo: sessionId, withPayload: [:], forRoomType: "") {
signalingController.sendCallMessage(message)
}
}
}

Expand All @@ -1335,13 +1337,12 @@ import SwiftUI
let signalingController = NCSettingsController.sharedInstance().externalSignalingController(forAccountId: self.room.accountId)
else { return }

let participantMap = signalingController.getParticipantMap()
let mySessionId = signalingController.sessionId()
// TODO: This should be part of the external signaling controller
let mySessionId = signalingController.sessionId

for (key, _) in participantMap {
if let sessionId = key as? String {
let message = NCStartedTypingMessage(from: mySessionId, sendTo: sessionId, withPayload: [:], forRoomType: "")
signalingController.sendCall(message)
for (sessionId, _) in signalingController.participantsMap {
if let message = NCStartedTypingMessage(from: mySessionId, sendTo: sessionId, withPayload: [:], forRoomType: "") {
signalingController.sendCallMessage(message)
}
}
}
Expand All @@ -1352,13 +1353,12 @@ import SwiftUI
let signalingController = NCSettingsController.sharedInstance().externalSignalingController(forAccountId: self.room.accountId)
else { return }

let participantMap = signalingController.getParticipantMap()
let mySessionId = signalingController.sessionId()
// TODO: This should be part of the external signaling controller
let mySessionId = signalingController.sessionId

for (key, _) in participantMap {
if let sessionId = key as? String {
let message = NCStoppedTypingMessage(from: mySessionId, sendTo: sessionId, withPayload: [:], forRoomType: "")
signalingController.sendCall(message)
for (sessionId, _) in signalingController.participantsMap {
if let message = NCStoppedTypingMessage(from: mySessionId, sendTo: sessionId, withPayload: [:], forRoomType: "") {
signalingController.sendCallMessage(message)
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions NextcloudTalk/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,12 @@ import SwiftUI
NotificationCenter.default.addObserver(self, selector: #selector(didReceiveMessagesInBackground(notification:)), name: NSNotification.Name.NCChatControllerDidReceiveMessagesInBackground, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didChangeRoomCapabilities(notification:)), name: NSNotification.Name.NCDatabaseManagerRoomCapabilitiesChanged, object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(didReceiveParticipantJoin(notification:)), name: NSNotification.Name.NCExternalSignalingControllerDidReceiveJoinOfParticipant, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didReceiveParticipantLeave(notification:)), name: NSNotification.Name.NCExternalSignalingControllerDidReceiveLeaveOfParticipant, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didReceiveStartedTyping(notification:)), name: NSNotification.Name.NCExternalSignalingControllerDidReceiveStartedTyping, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didReceiveStoppedTyping(notification:)), name: NSNotification.Name.NCExternalSignalingControllerDidReceiveStoppedTyping, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didReceiveParticipantJoin(notification:)), name: .extSignalingDidReceiveJoinOfParticipant, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didReceiveParticipantLeave(notification:)), name: .extSignalingDidReceiveLeaveOfParticipant, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didReceiveStartedTyping(notification:)), name: .extSignalingDidReceiveStartedTyping, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didReceiveStoppedTyping(notification:)), name: .extSignalingDidReceiveStoppedTyping, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didFailRequestingCallTransaction(notification:)), name: NSNotification.Name.CallKitManagerDidFailRequestingCallTransaction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didUpdateParticipants(notification:)), name: NSNotification.Name.NCExternalSignalingControllerDidUpdateParticipants, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didUpdateParticipants(notification:)), name: .extSignalingDidUpdateParticipants, object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(appDidBecomeActive(notification:)), name: UIApplication.didBecomeActiveNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(appWillResignActive(notification:)), name: UIApplication.willResignActiveNotification, object: nil)
Expand Down
2 changes: 1 addition & 1 deletion NextcloudTalk/NextcloudTalk-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#import "NCContactsManager.h"
#import "NCDatabaseManager.h"
#import "NCChatFileController.h"
#import "NCExternalSignalingController.h"
#import "NCSignalingMessage.h"
#import "NCNavigationController.h"
#import "NCPoll.h"
#import "NCRoomsManager.h"
Expand Down
1 change: 0 additions & 1 deletion NextcloudTalk/Rooms/NCRoomsManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#import "NCChatController.h"
#import "NCChatMessage.h"
#import "NCDatabaseManager.h"
#import "NCExternalSignalingController.h"
#import "NCSettingsController.h"
#import "NCUserInterfaceController.h"
#import "NotificationCenterNotifications.h"
Expand Down
8 changes: 4 additions & 4 deletions NextcloudTalk/Rooms/NCRoomsManagerExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ import Foundation

let federation = signalingSettings?.getFederationJoinDictionary()

extSignalingController.joinRoom(token, withSessionId: sessionId, withFederation: federation) { error in
extSignalingController.joinRoom(withRoomId: token, withSessionId: sessionId, withFederation: federation) { error in
// If the sessionId is not the same anymore we tried to join with, we either already left again before
// joining the external signaling server succeeded, or we already have another join in process
if !self.isJoiningRoom(withToken: token) {
Expand Down Expand Up @@ -250,7 +250,7 @@ import Foundation

self.joiningRoomToken = token
self.joinRoomTask = NCAPIController.sharedInstance().joinRoom(token, forAccount: activeAccount, completionBlock: { sessionId, room, error, statusCode, statusReason in
if error == nil {
if error == nil, let sessionId {
roomController.userSessionId = sessionId
roomController.inCall = true

Expand All @@ -269,7 +269,7 @@ import Foundation

let federation = signalingSettings?.getFederationJoinDictionary()

extSignalingController.joinRoom(token, withSessionId: sessionId, withFederation: federation) { error in
extSignalingController.joinRoom(withRoomId: token, withSessionId: sessionId, withFederation: federation) { error in
if error == nil {
NCUtils.log("Re-Joined room \(token) in external signaling server successfully.")
completionBlock(sessionId, room, nil, 0, nil)
Expand Down Expand Up @@ -320,7 +320,7 @@ import Foundation
print("Could not exit room. Error: \(error.localizedDescription)")
} else {
if let extSignalingController = NCSettingsController.sharedInstance().externalSignalingController(forAccountId: activeAccount.accountId) {
extSignalingController.leaveRoom(token)
extSignalingController.leaveRoom(withRoomId: token)
}

self.checkForPendingToStartCalls()
Expand Down
3 changes: 1 addition & 2 deletions NextcloudTalk/Settings/NCSettingsController.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#import "NCAPIController.h"
#import "NCAppBranding.h"
#import "NCDatabaseManager.h"
#import "NCExternalSignalingController.h"
#import "NCKeyChainController.h"
#import "NCRoomsManager.h"
#import "NCUserInterfaceController.h"
Expand Down Expand Up @@ -583,7 +582,7 @@ - (NCExternalSignalingController * _Nullable)setSignalingConfigurationForAccount
}

TalkAccount *account = [[NCDatabaseManager sharedInstance] talkAccountForAccountId:accountId];
extSignalingController = [[NCExternalSignalingController alloc] initWithAccount:account server:signalingSettings.server andTicket:signalingSettings.ticket];
extSignalingController = [[NCExternalSignalingController alloc] initWithAccount:account serverUrl:signalingSettings.server ticket:signalingSettings.ticket];
[self->_externalSignalingControllers setObject:extSignalingController forKey:accountId];

[bgTask stopBackgroundTask];
Expand Down
62 changes: 0 additions & 62 deletions NextcloudTalk/WebRTC/NCExternalSignalingController.h

This file was deleted.

Loading
Loading