wip
This commit is contained in:
parent
3756dfa527
commit
9155aa5ad8
|
@ -73,13 +73,7 @@ final class XMPPService: ObservableObject {
|
|||
}
|
||||
.store(in: &clientMessagesCancellables)
|
||||
|
||||
// enable carbons if available
|
||||
client.module(.messageCarbons).$isAvailable.filter { $0 }
|
||||
.sink(receiveValue: { [weak client] _ in
|
||||
client?.module(.messageCarbons).enable()
|
||||
})
|
||||
.store(in: &clientMessagesCancellables)
|
||||
|
||||
// subscribe to archived messages
|
||||
client.module(.mam).archivedMessagesPublisher
|
||||
.sink(receiveValue: { [weak self] archived in
|
||||
let message = archived.message
|
||||
|
@ -88,6 +82,13 @@ final class XMPPService: ObservableObject {
|
|||
})
|
||||
.store(in: &clientMessagesCancellables)
|
||||
|
||||
// enable carbons if available
|
||||
client.module(.messageCarbons).$isAvailable.filter { $0 }
|
||||
.sink(receiveValue: { [weak client] _ in
|
||||
client?.module(.messageCarbons).enable()
|
||||
})
|
||||
.store(in: &clientMessagesCancellables)
|
||||
|
||||
// finally, do login
|
||||
client.login()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue