wip
This commit is contained in:
parent
77b9aa8d3a
commit
59f802d385
|
@ -2,6 +2,8 @@ import Foundation
|
|||
import GRDB
|
||||
import Martin
|
||||
|
||||
extension Database: MartinsManager {}
|
||||
|
||||
// MARK: - Martin's roster manager
|
||||
extension Database: Martin.RosterManager {
|
||||
func clear(for context: Martin.Context) {
|
||||
|
|
|
@ -68,16 +68,16 @@ extension Database {
|
|||
|
||||
// 2nd migration - channels/rooms
|
||||
migrator.registerMigration("Add channels/rooms") { db in
|
||||
// channels
|
||||
try db.create(table: "channels", options: [.ifNotExists]) { table in
|
||||
// rooms
|
||||
try db.create(table: "rooms", options: [.ifNotExists]) { table in
|
||||
table.column("id", .text).notNull().primaryKey().unique(onConflict: .replace)
|
||||
table.column("account", .text).notNull()
|
||||
table.column("channel", .text).notNull()
|
||||
}
|
||||
|
||||
// rooms
|
||||
// try db.create(table: "rooms", options: [.ifNotExists]) { table in
|
||||
// channels
|
||||
// try db.create(table: "channels", options: [.ifNotExists]) { table in
|
||||
// table.column("id", .text).notNull().primaryKey().unique(onConflict: .replace)
|
||||
// table.column("account", .text).notNull()
|
||||
// table.column("channel", .text).notNull()
|
||||
// }
|
||||
}
|
||||
|
||||
|
|
|
@ -133,11 +133,11 @@ final class XMPPService: ObservableObject {
|
|||
client.connectionConfiguration.userJid = .init(account.bareJid)
|
||||
client.connectionConfiguration.credentials = .password(password: account.pass)
|
||||
|
||||
// channels
|
||||
client.modulesManager.register(MixModule(channelManager: manager))
|
||||
|
||||
// group chats
|
||||
// client.modulesManager.register(MucModule(roomManager: manager))
|
||||
client.modulesManager.register(MucModule(roomManager: manager))
|
||||
|
||||
// channels
|
||||
// client.modulesManager.register(MixModule(channelManager: manager))
|
||||
|
||||
// add client to clients
|
||||
return client
|
||||
|
|
Loading…
Reference in a new issue