You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
738 B
JavaScript
32 lines
738 B
JavaScript
/* global window, textsecure */
|
|
|
|
// eslint-disable-next-line func-names
|
|
(function() {
|
|
window.libloki = window.libloki || {};
|
|
|
|
async function sendFriendRequestAccepted(pubKey) {
|
|
return sendEmptyMessage(pubKey);
|
|
}
|
|
|
|
async function sendEmptyMessage(pubKey) {
|
|
const options = {};
|
|
// send an empty message.
|
|
// The logic downstream will attach the prekeys and our profile.
|
|
await textsecure.messaging.sendMessageToNumber(
|
|
pubKey, // number
|
|
null, // messageText
|
|
[], // attachments
|
|
null, // quote
|
|
Date.now(), // timestamp
|
|
null, // expireTimer
|
|
null, // profileKey
|
|
options
|
|
);
|
|
}
|
|
|
|
window.libloki.api = {
|
|
sendFriendRequestAccepted,
|
|
sendEmptyMessage,
|
|
};
|
|
})();
|