|
@@ -11,9 +11,8 @@ export type PreNotifyProps = {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export type PreNotify = (props: PreNotifyProps) => Promise<void>;
|
|
export type PreNotify = (props: PreNotifyProps) => Promise<void>;
|
|
|
-export type GeneratePreNotify = (activity: ActivityDocument, getAdditionalTargetUsers?: (activity?: ActivityDocument) => Ref<IUser>[]) => PreNotify;
|
|
|
|
|
-
|
|
|
|
|
-export type GetAdditionalTargetUsers = (activity: ActivityDocument) => Ref<IUser>[];
|
|
|
|
|
|
|
+export type GetAdditionalTargetUsers = (activity: ActivityDocument) => Promise<Ref<IUser>[]>;
|
|
|
|
|
+export type GeneratePreNotify = (activity: ActivityDocument, getAdditionalTargetUsers?: GetAdditionalTargetUsers) => PreNotify;
|
|
|
|
|
|
|
|
interface IPreNotifyService {
|
|
interface IPreNotifyService {
|
|
|
generateInitialPreNotifyProps: (PreNotifyProps) => { notificationTargetUsers?: Ref<IUser>[] },
|
|
generateInitialPreNotifyProps: (PreNotifyProps) => { notificationTargetUsers?: Ref<IUser>[] },
|
|
@@ -48,7 +47,7 @@ class PreNotifyService implements IPreNotifyService {
|
|
|
notificationTargetUsers?.push(...activeNotificationUsers);
|
|
notificationTargetUsers?.push(...activeNotificationUsers);
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- const AdditionalTargetUsers = getAdditionalTargetUsers(activity);
|
|
|
|
|
|
|
+ const AdditionalTargetUsers = await getAdditionalTargetUsers(activity);
|
|
|
|
|
|
|
|
notificationTargetUsers?.push(
|
|
notificationTargetUsers?.push(
|
|
|
...activeNotificationUsers,
|
|
...activeNotificationUsers,
|