feat: Add hardened error handling and retries (#2451)
- Closes #1830 - Closes #2099
This commit is contained in:
committed by
dermotduffy
parent
4bc787e2b7
commit
47bcce93d3
@@ -0,0 +1,10 @@
|
||||
import { Notification } from '../../config/schema/actions/types.js';
|
||||
|
||||
export const summarizeNotification = (notification: Notification): string | null => {
|
||||
const text = notification.body?.text ?? notification.heading?.text ?? null;
|
||||
if (!text) {
|
||||
return null;
|
||||
}
|
||||
const metadata = notification.metadata?.map((m) => m.text).join(', ');
|
||||
return metadata ? `${text} [${metadata}]` : text;
|
||||
};
|
||||
Reference in New Issue
Block a user