Skip to content

Commit

Permalink
Fix issue with sending PMs
Browse files Browse the repository at this point in the history
  • Loading branch information
f-r00t committed Feb 21, 2024
1 parent 9b5ff0d commit 0cd2abe
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions src/HuginUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,23 +669,20 @@ export async function sendMessage(message, receiver, messageKey, silent=false) {
} catch (err) {
console.log('Failed to send with Hugin API..')
}

if (result.success) {
if (message.substring(0,1) == 'Δ' || message.substring(0,1) == 'Λ') {
message = 'Call started';
}
if (message.substring(0,1) == 'δ' || message.substring(0,1) == 'λ') {
message = 'Call answered';
}
saveMessage(receiver, 'sent', message, timestamp);
backgroundSave();
}

return result;
}

Globals.logger.addLogMessage(JSON.stringify(result));
if (result.success) {
if (message.substring(0,1) == 'Δ' || message.substring(0,1) == 'Λ') {
message = 'Call started';
}
if (message.substring(0,1) == 'δ' || message.substring(0,1) == 'λ') {
message = 'Call answered';
}
saveMessage(receiver, 'sent', message, timestamp);
backgroundSave();
}

}
return result;

}

Expand Down

0 comments on commit 0cd2abe

Please sign in to comment.