wip
This commit is contained in:
@@ -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 } : {}),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user