This commit is contained in:
fmodf 2024-07-22 19:09:08 +02:00
parent 002e152604
commit 2dc41c2013
2 changed files with 18 additions and 1 deletions

View file

@ -79,6 +79,23 @@ final class XMPPService: ObservableObject {
}).store(in: &clientMessagesCancellables) }).store(in: &clientMessagesCancellables)
client.login() client.login()
client.module(.mam).$availableVersions.sink(receiveValue: { [weak client] versions in
guard !versions.isEmpty, let client = client else {
return
}
print("MAM available versions: \(versions)")
// MessageEventHandler.syncMessagesScheduled(for: client)
}).store(in: &clientMessagesCancellables)
client.module(.mam).archivedMessagesPublisher.sink(receiveValue: { archived in
print("MAM archived message: \(archived.message)")
// guard let conversation = MessageEventHandler.conversationKey(for: archived.message, on: account) else {
// return
// }
// DBChatHistoryStore.instance.append(for: conversation, message: archived.message, source: .archive(source: archived.source, version: archived.query.version, messageId: archived.messageId, timestamp: archived.timestamp))
}).store(in: &clientMessagesCancellables)
} }
// remove clients // remove clients

View file

@ -53,7 +53,7 @@ targets:
# UIUserInterfaceStyle: Light # UIUserInterfaceStyle: Light
CFBundleDisplayName: Conversations CFBundleDisplayName: Conversations
CFBundleShortVersionString: "1.0.0" CFBundleShortVersionString: "1.0.0"
CFBundleVersion: "1" CFBundleVersion: "2"
sources: sources:
- path: ConversationsClassic - path: ConversationsClassic
excludes: excludes: