Wait for `ConversationController` load in receipt and sync jobs
This commit is contained in:
parent
29c3b8af89
commit
ed96e603ab
|
@ -102,6 +102,8 @@ export async function runReadOrViewSyncJob({
|
|||
return;
|
||||
}
|
||||
|
||||
await window.ConversationController.load();
|
||||
|
||||
const ourConversation =
|
||||
window.ConversationController.getOurConversationOrThrow();
|
||||
const sendOptions = await getSendOptions(ourConversation.attributes, {
|
||||
|
|
|
@ -7851,6 +7851,20 @@
|
|||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2021-10-22T00:52:39.251Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-load(",
|
||||
"path": "ts/jobs/helpers/readAndViewSyncHelpers.js",
|
||||
"line": " await window.ConversationController.load();",
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2021-12-15T19:58:28.089Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-load(",
|
||||
"path": "ts/jobs/helpers/readAndViewSyncHelpers.ts",
|
||||
"line": " await window.ConversationController.load();",
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2021-12-15T19:58:28.089Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-load(",
|
||||
"path": "ts/jobs/normalMessageSendJobQueue.js",
|
||||
|
@ -8152,6 +8166,20 @@
|
|||
"updated": "2021-08-18T18:22:55.307Z",
|
||||
"reasonDetail": "Legacy code"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-load(",
|
||||
"path": "ts/util/sendReceipts.js",
|
||||
"line": " await window.ConversationController.load();",
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2021-12-15T19:58:28.089Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-load(",
|
||||
"path": "ts/util/sendReceipts.ts",
|
||||
"line": " await window.ConversationController.load();",
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2021-12-15T19:58:28.089Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-$(",
|
||||
"path": "ts/util/setupI18n.js",
|
||||
|
|
|
@ -79,6 +79,8 @@ export async function sendReceipts({
|
|||
new Map()
|
||||
);
|
||||
|
||||
await window.ConversationController.load();
|
||||
|
||||
await Promise.all(
|
||||
map(receiptsBySenderId, async ([senderId, receiptsForSender]) => {
|
||||
const sender = window.ConversationController.get(senderId);
|
||||
|
|
Loading…
Reference in New Issue