Note to Self
This commit is contained in:
parent
681ca363fe
commit
a43a78731a
15 changed files with 411 additions and 148 deletions
|
@ -759,6 +759,37 @@ MessageSender.prototype = {
|
|||
});
|
||||
},
|
||||
|
||||
async getMessageProto(
|
||||
number,
|
||||
body,
|
||||
attachments,
|
||||
quote,
|
||||
preview,
|
||||
timestamp,
|
||||
expireTimer,
|
||||
profileKey
|
||||
) {
|
||||
const attributes = {
|
||||
recipients: [number],
|
||||
body,
|
||||
timestamp,
|
||||
attachments,
|
||||
quote,
|
||||
preview,
|
||||
expireTimer,
|
||||
profileKey,
|
||||
};
|
||||
|
||||
const message = new Message(attributes);
|
||||
await Promise.all([
|
||||
this.uploadAttachments(message),
|
||||
this.uploadThumbnails(message),
|
||||
this.uploadLinkPreviews(message),
|
||||
]);
|
||||
|
||||
return message.toArrayBuffer();
|
||||
},
|
||||
|
||||
sendMessageToNumber(
|
||||
number,
|
||||
messageText,
|
||||
|
@ -1110,6 +1141,7 @@ textsecure.MessageSender = function MessageSenderWrapper(
|
|||
this.sendReadReceipts = sender.sendReadReceipts.bind(sender);
|
||||
this.makeProxiedRequest = sender.makeProxiedRequest.bind(sender);
|
||||
this.getProxiedSize = sender.getProxiedSize.bind(sender);
|
||||
this.getMessageProto = sender.getMessageProto.bind(sender);
|
||||
};
|
||||
|
||||
textsecure.MessageSender.prototype = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue