Revert "fix: show invite failed toast even if the first part of update failed"

This reverts commit bc62b0ec40.
pull/3281/head
Audric Ackermann 5 months ago
parent bc62b0ec40
commit 8d3ed1a2b7
No known key found for this signature in database

@ -660,16 +660,6 @@ async function handleMemberAddedFromUI({
updateMessagesToPush, updateMessagesToPush,
group group
); );
// schedule send invite details, auth signature, etc. to the new users
// those will fail is the pushChangesToGroupSwarmIfNeeded fails, but we still want
// to display the toasts message saying they failed
await scheduleGroupInviteJobs(
groupPk,
withHistory,
withoutHistory,
window.sessionFeatureFlags.useGroupV2InviteAsAdmin
);
await LibSessionUtil.saveDumpsToDb(groupPk);
// push new members & key supplement in a single batch call // push new members & key supplement in a single batch call
const sequenceResult = await GroupSync.pushChangesToGroupSwarmIfNeeded({ const sequenceResult = await GroupSync.pushChangesToGroupSwarmIfNeeded({
@ -679,14 +669,21 @@ async function handleMemberAddedFromUI({
unrevokeSubRequest, unrevokeSubRequest,
extraStoreRequests, extraStoreRequests,
}); });
await LibSessionUtil.saveDumpsToDb(groupPk);
if (sequenceResult !== RunJobResult.Success) { if (sequenceResult !== RunJobResult.Success) {
throw new Error( throw new Error(
'handleMemberAddedFromUIOrNot: pushChangesToGroupSwarmIfNeeded did not return success' 'handleMemberAddedFromUIOrNot: pushChangesToGroupSwarmIfNeeded did not return success'
); );
} }
// schedule send invite details, auth signature, etc. to the new users
await scheduleGroupInviteJobs(
groupPk,
withHistory,
withoutHistory,
window.sessionFeatureFlags.useGroupV2InviteAsAdmin
);
await LibSessionUtil.saveDumpsToDb(groupPk);
convo.set({ convo.set({
active_at: createAtNetworkTimestamp, active_at: createAtNetworkTimestamp,
}); });

Loading…
Cancel
Save