stop-send.ts (768B)
1 import { 2 stopPrivateRetry, 3 privateRetrySnapshot, 4 type PrivateRetry 5 } from './retry-send.ts'; 6 // Stop prevents future scheduling. It does not retract a relay attempt or 7 // acknowledge recipient delivery. Original attempt facts reconcile separately. 8 export function stopPrivateSend(operation: PrivateRetry): void { 9 stopPrivateRetry(operation); 10 } 11 export function privateStopSendSnapshot(operation: PrivateRetry) { 12 const view = privateRetrySnapshot(operation); 13 return ( 14 view && { 15 ...view, 16 labels: 17 view.state === 'stopped' 18 ? [ 19 'Stopped', 20 'Already attempted delivery may remain uncertain', 21 'Resume requires an explicit matching-account action' 22 ] 23 : [] 24 } 25 ); 26 }