Commit 0ec05d66 authored by Marco Martin's avatar Marco Martin

e telepathyHelper for calling

parent b4823d8c
......@@ -64,8 +64,20 @@ Item {
//BEGIN FUNCTIONS
function call(number) {
if (!callManager.foregroundCall) {
console.log("Calling: " + providerId + " " + number);
callManager.startCall(number, providerId);
var account = null;
if (telepathyHelper.activeAccounts.length > 0) {
account = telepathyHelper.activeAccounts[0];
} else {
// if no account is active, use any account that can make emergency calls
for (var i in telepathyHelper.accounts) {
if (telepathyHelper.accounts[i].emergencyCallsAvailable) {
account = telepathyHelper.accounts[i];
break;
}
}
}
console.log("Calling: " + number + " " + account.accountId);
callManager.startCall(number, account.accountId);
} else {
console.log("Hanging up: " + callManager.foregroundCall.phoneNumber);
......
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