mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-07-17 04:57:18 +02:00
Update Ghostgram features
This commit is contained in:
@@ -118,23 +118,23 @@ private func actionFromActivity(_ activity: PeerInputActivity?) -> Api.SendMessa
|
||||
case .playingGame:
|
||||
return .sendMessageGamePlayAction
|
||||
case let .uploadingFile(progress):
|
||||
return .sendMessageUploadDocumentAction(progress: progress)
|
||||
return .sendMessageUploadDocumentAction(.init(progress: progress))
|
||||
case let .uploadingPhoto(progress):
|
||||
return .sendMessageUploadPhotoAction(progress: progress)
|
||||
return .sendMessageUploadPhotoAction(.init(progress: progress))
|
||||
case let .uploadingVideo(progress):
|
||||
return .sendMessageUploadVideoAction(progress: progress)
|
||||
return .sendMessageUploadVideoAction(.init(progress: progress))
|
||||
case .recordingInstantVideo:
|
||||
return .sendMessageRecordRoundAction
|
||||
case let .uploadingInstantVideo(progress):
|
||||
return .sendMessageUploadRoundAction(progress: progress)
|
||||
return .sendMessageUploadRoundAction(.init(progress: progress))
|
||||
case .speakingInGroupCall:
|
||||
return .speakingInGroupCallAction
|
||||
case .choosingSticker:
|
||||
return .sendMessageChooseStickerAction
|
||||
case let .interactingWithEmoji(emoticon, messageId, interaction):
|
||||
return .sendMessageEmojiInteraction(emoticon: emoticon, msgId: messageId.id, interaction: interaction?.apiDataJson ?? .dataJSON(data: ""))
|
||||
return .sendMessageEmojiInteraction(.init(emoticon: emoticon, msgId: messageId.id, interaction: interaction?.apiDataJson ?? .dataJSON(.init(data: ""))))
|
||||
case let .seeingEmojiInteraction(emoticon):
|
||||
return .sendMessageEmojiInteractionSeen(emoticon: emoticon)
|
||||
return .sendMessageEmojiInteractionSeen(.init(emoticon: emoticon))
|
||||
}
|
||||
} else {
|
||||
return .sendMessageCancelAction
|
||||
@@ -142,7 +142,7 @@ private func actionFromActivity(_ activity: PeerInputActivity?) -> Api.SendMessa
|
||||
}
|
||||
|
||||
private func requestActivity(postbox: Postbox, network: Network, accountPeerId: PeerId, peerId: PeerId, threadId: Int64?, activity: PeerInputActivity?) -> Signal<Void, NoError> {
|
||||
// GHOST MODE: Block typing indicator
|
||||
// GHOST MODE: Block typing indicator updates.
|
||||
if GhostModeManager.shared.shouldHideTypingIndicator {
|
||||
return .complete()
|
||||
}
|
||||
@@ -195,7 +195,7 @@ private func requestActivity(postbox: Postbox, network: Network, accountPeerId:
|
||||
}
|
||||
} else if let peer = peer as? TelegramSecretChat, activity == .typingText {
|
||||
let _ = PeerId(peer.id.toInt64())
|
||||
return network.request(Api.functions.messages.setEncryptedTyping(peer: .inputEncryptedChat(chatId: Int32(peer.id.id._internalGetInt64Value()), accessHash: peer.accessHash), typing: .boolTrue))
|
||||
return network.request(Api.functions.messages.setEncryptedTyping(peer: .inputEncryptedChat(.init(chatId: Int32(peer.id.id._internalGetInt64Value()), accessHash: peer.accessHash)), typing: .boolTrue))
|
||||
|> `catch` { _ -> Signal<Api.Bool, NoError> in
|
||||
return .single(.boolFalse)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user