Use job queue when restoring call links from storage

This commit is contained in:
ayumi-signal 2024-09-16 22:54:59 -07:00 committed by GitHub
commit f23f86d0e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 138 additions and 10 deletions

View file

@ -78,6 +78,7 @@ import {
toCallHistoryFromUnusedCallLink,
} from '../util/callLinks';
import { isOlderThan } from '../util/timestamp';
import { callLinkRefreshJobQueue } from '../jobs/callLinkRefreshJobQueue';
const MY_STORY_BYTES = uuidToBytes(MY_STORY_ID);
@ -2024,11 +2025,7 @@ export async function mergeCallLinkRecord(
DataWriter.saveCallHistory(callHistory),
]);
// Refresh call link state via RingRTC and update in redux
window.reduxActions.calling.handleCallLinkUpdate({
rootKey: rootKeyString,
adminKey: adminKeyString,
});
drop(callLinkRefreshJobQueue.add({ roomId: callLink.roomId }));
window.reduxActions.callHistory.addCallHistory(callHistory);
}