mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Redacting is now displayed for moderators in groups (#1324)
* basic implementation * sdk update * format * changelog
This commit is contained in:
@@ -718,6 +718,11 @@ class RoomProxyMock: RoomProxyProtocol {
|
||||
set(value) { underlyingHasUnreadNotifications = value }
|
||||
}
|
||||
var underlyingHasUnreadNotifications: Bool!
|
||||
var ownUserID: String {
|
||||
get { return underlyingOwnUserID }
|
||||
set(value) { underlyingOwnUserID = value }
|
||||
}
|
||||
var underlyingOwnUserID: String!
|
||||
var name: String?
|
||||
var displayName: String?
|
||||
var topic: String?
|
||||
@@ -1360,6 +1365,27 @@ class RoomProxyMock: RoomProxyProtocol {
|
||||
return uploadAvatarMediaReturnValue
|
||||
}
|
||||
}
|
||||
//MARK: - canUserRedact
|
||||
|
||||
var canUserRedactUserIDCallsCount = 0
|
||||
var canUserRedactUserIDCalled: Bool {
|
||||
return canUserRedactUserIDCallsCount > 0
|
||||
}
|
||||
var canUserRedactUserIDReceivedUserID: String?
|
||||
var canUserRedactUserIDReceivedInvocations: [String] = []
|
||||
var canUserRedactUserIDReturnValue: Result<Bool, RoomProxyError>!
|
||||
var canUserRedactUserIDClosure: ((String) async -> Result<Bool, RoomProxyError>)?
|
||||
|
||||
func canUserRedact(userID: String) async -> Result<Bool, RoomProxyError> {
|
||||
canUserRedactUserIDCallsCount += 1
|
||||
canUserRedactUserIDReceivedUserID = userID
|
||||
canUserRedactUserIDReceivedInvocations.append(userID)
|
||||
if let canUserRedactUserIDClosure = canUserRedactUserIDClosure {
|
||||
return await canUserRedactUserIDClosure(userID)
|
||||
} else {
|
||||
return canUserRedactUserIDReturnValue
|
||||
}
|
||||
}
|
||||
}
|
||||
class RoomTimelineProviderMock: RoomTimelineProviderProtocol {
|
||||
var updatePublisher: AnyPublisher<TimelineProviderUpdate, Never> {
|
||||
|
||||
Reference in New Issue
Block a user