Verified Commit 0e9f4394 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Pass ofono0 account when starting conversations from non-ktp contacts

parent 68390bde
Pipeline #16039 canceled with stage
......@@ -49,7 +49,13 @@ Kirigami.ScrollablePage {
target: root
onStartChat: {
mainModel.startChat(personUri)
if (personUri.startsWith("ktp:/")) {
// This overload only accepts ktp uris, but figures out the account id itself.
mainModel.startChat(personUri)
} else {
// assume vcard contacts as sms
mainModel.startChat("ofono/ofono/account0", personUri)
}
}
}
......@@ -107,8 +113,8 @@ Kirigami.ScrollablePage {
root.pageStack.currentItem.conversation = model.conversation;
// If the account is online, request a channel
if (mainModel.canChat(accountId)) {
mainModel.startChat(accountId, contactId);
if (mainModel.canChat(model.accountId)) {
mainModel.startChat(model.accountId, model.contactId);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment