mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2026-03-10 18:41:46 +00:00
Compare commits
9 Commits
feature/al
...
1f521dfc41
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f521dfc41 | |||
| 0640c8b59a | |||
| 75e0f14bd9 | |||
| 64a6cc9ddd | |||
| 2ab9554c0c | |||
| a7dee2dc1e | |||
| 1822f074c6 | |||
| 95d0f0f4b0 | |||
| 8d56a8da0f |
@ -30,9 +30,9 @@
|
||||
{
|
||||
"id": "change_phone_number",
|
||||
"question_en": "How do I change my phone number?",
|
||||
"answer_en": "You cannot update your phone number",
|
||||
"answer_en": "At the moment, phone numbers can’t be changed directly in the app. Please contact our support team, and they’ll assist you with updating it.",
|
||||
"question_ar": "كيف أغيّر رقم هاتفي؟",
|
||||
"answer_ar": "لا يمكنك تحديث رقم هاتفك."
|
||||
"answer_ar": "حاليًا لا يمكن تغيير أرقام الهواتف مباشرةً داخل التطبيق. يرجى التواصل مع فريق الدعم، وسيساعدونك في تحديثه."
|
||||
},
|
||||
{
|
||||
"id": "activate_card",
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
import { I18nService } from 'nestjs-i18n';
|
||||
import { Roles } from '~/auth/enums';
|
||||
import { NotificationFactory, NotificationPreferences } from '../services/notification-factory.service';
|
||||
import { UserService } from '~/user/services/user.service';
|
||||
import { NOTIFICATION_EVENTS } from '../constants/event-names.constant';
|
||||
@ -24,6 +25,14 @@ export class ProfileNotificationListener {
|
||||
try {
|
||||
const { user, updatedFields } = event;
|
||||
|
||||
// Do not notify when a child updates their profile (no notification to child or parent)
|
||||
if (user?.roles?.includes(Roles.JUNIOR)) {
|
||||
this.logger.log(
|
||||
`Skipping profile updated notification for child user ${user.id} - no notification sent`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
this.logger.log(
|
||||
`Processing profile updated notification for user ${user.id} - Updated fields: ${updatedFields.join(', ')}`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user