Note to Self
This commit is contained in:
parent
681ca363fe
commit
a43a78731a
15 changed files with 411 additions and 148 deletions
|
@ -312,6 +312,7 @@
|
|||
|
||||
const result = {
|
||||
...this.format(),
|
||||
isMe: this.isMe(),
|
||||
conversationType: this.isPrivate() ? 'direct' : 'group',
|
||||
|
||||
lastUpdated: this.get('timestamp'),
|
||||
|
@ -908,6 +909,25 @@
|
|||
return null;
|
||||
}
|
||||
|
||||
const attachmentsWithData = await Promise.all(
|
||||
messageWithSchema.attachments.map(loadAttachmentData)
|
||||
);
|
||||
|
||||
// Special-case the self-send case - we send only a sync message
|
||||
if (this.isMe()) {
|
||||
const dataMessage = await textsecure.messaging.getMessageProto(
|
||||
destination,
|
||||
body,
|
||||
attachmentsWithData,
|
||||
quote,
|
||||
preview,
|
||||
now,
|
||||
expireTimer,
|
||||
profileKey
|
||||
);
|
||||
return message.sendSyncMessageOnly(dataMessage);
|
||||
}
|
||||
|
||||
const conversationType = this.get('type');
|
||||
const sendFunction = (() => {
|
||||
switch (conversationType) {
|
||||
|
@ -922,10 +942,6 @@
|
|||
}
|
||||
})();
|
||||
|
||||
const attachmentsWithData = await Promise.all(
|
||||
messageWithSchema.attachments.map(loadAttachmentData)
|
||||
);
|
||||
|
||||
const options = this.getSendOptions();
|
||||
return message.send(
|
||||
this.wrapSend(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue