This commit is contained in:
2025-12-11 21:06:25 +01:00
parent c49ea2598d
commit ec3ddc3a5c
227 changed files with 3496 additions and 2083 deletions

View File

@@ -184,12 +184,17 @@ export class Notification implements IEntity<string> {
* Mark that the user has responded to an action_required notification
*/
markAsResponded(actionId?: string): Notification {
const data =
actionId !== undefined
? { ...(this.props.data ?? {}), responseActionId: actionId }
: this.props.data;
return new Notification({
...this.props,
status: 'read',
readAt: this.props.readAt ?? new Date(),
respondedAt: new Date(),
data: actionId ? { ...this.props.data, responseActionId: actionId } : this.props.data,
...(data !== undefined ? { data } : {}),
});
}