@room in user suggestions (#1880)

* for now I am using a local RTE solution, need to fix one test

* fixed a test

* new rte version

* pr suggestions

* @room added to the suggestions

* removed empty space

* revert

* code improvement

* project updated

* package
This commit is contained in:
Mauro
2023-10-12 18:15:47 +02:00
committed by GitHub
parent 2c5662a278
commit ad0b2f114f
21 changed files with 241 additions and 76 deletions
@@ -1749,6 +1749,27 @@ class RoomProxyMock: RoomProxyProtocol {
return canUserRedactUserIDReturnValue
}
}
//MARK: - canUserTriggerRoomNotification
var canUserTriggerRoomNotificationUserIDCallsCount = 0
var canUserTriggerRoomNotificationUserIDCalled: Bool {
return canUserTriggerRoomNotificationUserIDCallsCount > 0
}
var canUserTriggerRoomNotificationUserIDReceivedUserID: String?
var canUserTriggerRoomNotificationUserIDReceivedInvocations: [String] = []
var canUserTriggerRoomNotificationUserIDReturnValue: Result<Bool, RoomProxyError>!
var canUserTriggerRoomNotificationUserIDClosure: ((String) async -> Result<Bool, RoomProxyError>)?
func canUserTriggerRoomNotification(userID: String) async -> Result<Bool, RoomProxyError> {
canUserTriggerRoomNotificationUserIDCallsCount += 1
canUserTriggerRoomNotificationUserIDReceivedUserID = userID
canUserTriggerRoomNotificationUserIDReceivedInvocations.append(userID)
if let canUserTriggerRoomNotificationUserIDClosure = canUserTriggerRoomNotificationUserIDClosure {
return await canUserTriggerRoomNotificationUserIDClosure(userID)
} else {
return canUserTriggerRoomNotificationUserIDReturnValue
}
}
//MARK: - createPoll
var createPollQuestionAnswersPollKindCallsCount = 0