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