Skip to content

Commit 9bf51ed

Browse files
committed
add title for reported join request
1 parent 6875ba1 commit 9bf51ed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/firebase/functions/src/notification/notification.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,15 @@ export const notifyData: Record<string, IEventObject> = {
229229
data: async (proposalId: string): Promise<Record<string, any>> => {
230230
const proposalData = (await proposalDb.getProposal(proposalId));
231231
const commonData = (await commonDb.get(proposalData.commonId));
232+
const type = proposalData.type === 'join' ? 'membership request' : 'proposal';
232233
return {
233234
reporter: (await getUserById(proposalData?.moderation?.reporter)).data(),
234235
commonData,
235-
path: `ProposalScreen/${commonData.id}/${proposalData.id}`
236+
path: `ProposalScreen/${commonData.id}/${proposalData.id}`,
237+
type,
236238
};
237239
},
238-
notification: async ({ reporter, commonData, path }): Promise<Record<string, string>> => notifyModerators(reporter, commonData, path, 'proposal'),
240+
notification: async ({ reporter, commonData, path, type }): Promise<Record<string, string>> => notifyModerators(reporter, commonData, path, type),
239241
email: ({ commonData, reporter }: {
240242
commonData: ICommonEntity;
241243
reporter: IUserEntity;

0 commit comments

Comments
 (0)