wip
This commit is contained in:
parent
60e14a5406
commit
9b8b5d1ae6
|
@ -208,19 +208,20 @@ final class MonalChatWrapper: ObservableObject {
|
|||
}
|
||||
|
||||
func sendText(_ text: String) {
|
||||
let msgId = db.addMessageHistory(
|
||||
let newMessageId = UUID().uuidString
|
||||
_ = db.addMessageHistory(
|
||||
to: contact.contactJid,
|
||||
forAccount: monalContact.accountID,
|
||||
withMessage: text,
|
||||
actuallyFrom: account.jid,
|
||||
withId: UUID().uuidString,
|
||||
withId: newMessageId,
|
||||
encrypted: monalContact.isEncrypted,
|
||||
messageType: kMessageTypeText,
|
||||
mimeType: nil,
|
||||
size: nil
|
||||
)
|
||||
xmpp.sendMessage(text, to: monalContact, isEncrypted: monalContact.isEncrypted, isUpload: false, messageId: "\(msgId)")
|
||||
NotificationCenter.default.post(name: Notification.Name(kMonalSentMessageNotice), object: nil)
|
||||
print(newMessageId)
|
||||
xmpp.sendMessage(text, to: monalContact, isEncrypted: monalContact.isEncrypted, isUpload: false, messageId: newMessageId)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue