Properly retry story messages
This commit is contained in:
parent
55a1c5f6c5
commit
1b3a631903
1 changed files with 32 additions and 14 deletions
|
@ -1383,20 +1383,38 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
||||||
|
|
||||||
this.set('sendStateByConversationId', newSendStateByConversationId);
|
this.set('sendStateByConversationId', newSendStateByConversationId);
|
||||||
|
|
||||||
await conversationJobQueue.add(
|
if (isStory(this.attributes)) {
|
||||||
{
|
await conversationJobQueue.add(
|
||||||
type: conversationQueueJobEnum.enum.NormalMessage,
|
{
|
||||||
conversationId: conversation.id,
|
type: conversationQueueJobEnum.enum.Story,
|
||||||
messageId: this.id,
|
conversationId: conversation.id,
|
||||||
revision: conversation.get('revision'),
|
messageIds: [this.id],
|
||||||
},
|
// using the group timestamp, which will differ from the 1:1 timestamp
|
||||||
async jobToInsert => {
|
timestamp: this.attributes.timestamp,
|
||||||
await window.Signal.Data.saveMessage(this.attributes, {
|
},
|
||||||
jobToInsert,
|
async jobToInsert => {
|
||||||
ourUuid: window.textsecure.storage.user.getCheckedUuid().toString(),
|
await window.Signal.Data.saveMessage(this.attributes, {
|
||||||
});
|
jobToInsert,
|
||||||
}
|
ourUuid: window.textsecure.storage.user.getCheckedUuid().toString(),
|
||||||
);
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
await conversationJobQueue.add(
|
||||||
|
{
|
||||||
|
type: conversationQueueJobEnum.enum.NormalMessage,
|
||||||
|
conversationId: conversation.id,
|
||||||
|
messageId: this.id,
|
||||||
|
revision: conversation.get('revision'),
|
||||||
|
},
|
||||||
|
async jobToInsert => {
|
||||||
|
await window.Signal.Data.saveMessage(this.attributes, {
|
||||||
|
jobToInsert,
|
||||||
|
ourUuid: window.textsecure.storage.user.getCheckedUuid().toString(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isReplayableError(e: Error): boolean {
|
isReplayableError(e: Error): boolean {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue