mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Send UTD occurences to Posthog (#2575)
Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
This commit is contained in:
@@ -589,6 +589,7 @@ class ClientProxy: ClientProxyProtocol {
|
||||
let syncService = try await client
|
||||
.syncService()
|
||||
.withCrossProcessLock(appIdentifier: "MainApp")
|
||||
.withUtdHook(delegate: ClientDecryptionErrorDelegate(actionsSubject: actionsSubject))
|
||||
.finish()
|
||||
let roomListService = syncService.roomListService()
|
||||
|
||||
@@ -803,6 +804,18 @@ private class ClientDelegateWrapper: ClientDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
private class ClientDecryptionErrorDelegate: UnableToDecryptDelegate {
|
||||
private let actionsSubject: PassthroughSubject<ClientProxyAction, Never>
|
||||
|
||||
init(actionsSubject: PassthroughSubject<ClientProxyAction, Never>) {
|
||||
self.actionsSubject = actionsSubject
|
||||
}
|
||||
|
||||
func onUtd(info: UnableToDecryptInfo) {
|
||||
actionsSubject.send(.receivedDecryptionError(info))
|
||||
}
|
||||
}
|
||||
|
||||
private class IgnoredUsersListenerProxy: IgnoredUsersListener {
|
||||
private let onUpdateClosure: ([String]) -> Void
|
||||
|
||||
|
||||
Reference in New Issue
Block a user