Skip to content

Commit

Permalink
Merge pull request #1739 from nextcloud/workaround-sending-federated-…
Browse files Browse the repository at this point in the history
…typing-indicators

Workaround for sending federated typing indicators
  • Loading branch information
SystemKeeper authored Jul 31, 2024
2 parents 335e705 + 85c5f9f commit 495f0d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions NextcloudTalk/BaseChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,9 @@ import QuickLook
// MARK: - TypingIndicator support

func sendStartedTypingMessage(to sessionId: String) {
guard let serverCapabilities = NCDatabaseManager.sharedInstance().roomTalkCapabilities(for: self.room)
// Workaround: TypingPrivacy should be checked locally, not from the remote server, use serverCapabilities for now
// TODO: Remove workaround for federated typing indicators.
guard let serverCapabilities = NCDatabaseManager.sharedInstance().serverCapabilities(forAccountId: self.room.accountId)
else { return }

if serverCapabilities.typingPrivacy {
Expand All @@ -1161,7 +1163,9 @@ import QuickLook
}

func sendStartedTypingMessageToAll() {
guard let serverCapabilities = NCDatabaseManager.sharedInstance().roomTalkCapabilities(for: self.room),
// Workaround: TypingPrivacy should be checked locally, not from the remote server, use serverCapabilities for now
// TODO: Remove workaround for federated typing indicators.
guard let serverCapabilities = NCDatabaseManager.sharedInstance().serverCapabilities(forAccountId: self.room.accountId),
!serverCapabilities.typingPrivacy,
let signalingController = NCSettingsController.sharedInstance().externalSignalingController(forAccountId: self.room.accountId),
let participantMap = signalingController.getParticipantMap()
Expand Down

0 comments on commit 495f0d1

Please sign in to comment.