Fixes #2347, #2348, #2349 - Add support for typing notifications

This commit is contained in:
Stefan Ceriu
2024-02-13 15:27:52 +02:00
committed by GitHub
parent 2b2accaca6
commit f2e9c32e8d
26 changed files with 346 additions and 47 deletions
@@ -33,6 +33,7 @@ enum RoomProxyError: Error, Equatable {
case failedCheckingPermission
case failedMarkingAsRead
case failedMarkingAsUnread
case failedSendingTypingNotice
}
enum RoomProxyAction {
@@ -52,6 +53,7 @@ protocol RoomProxyProtocol {
var ownUserID: String { get }
var name: String? { get }
var displayName: String? { get }
var topic: String? { get }
@@ -59,6 +61,8 @@ protocol RoomProxyProtocol {
var avatarURL: URL? { get }
var members: CurrentValuePublisher<[RoomMemberProxyProtocol], Never> { get }
var typingMembers: CurrentValuePublisher<[String], Never> { get }
var joinedMembersCount: Int { get }
@@ -108,6 +112,9 @@ protocol RoomProxyProtocol {
func markAsRead(sendReadReceipts: Bool, receiptType: ReceiptType) async -> Result<Void, RoomProxyError>
/// https://spec.matrix.org/v1.9/client-server-api/#typing-notifications
@discardableResult func sendTypingNotification(isTyping: Bool) async -> Result<Void, RoomProxyError>
// MARK: - Element Call
func canUserJoinCall(userID: String) async -> Result<Bool, RoomProxyError>