Don't save error report phone and defaut to report phone
MODIFY
src/server/rest/v1/service/NotificationService.ts
src/server/rest/v1/service/NotificationService.ts
@@ -63,16 +63,11 @@ export default class NotificationService {
// Check and Get User
const user = await UtilsService.checkAndGetUserAuthorization(
req.tenant, req.user, req.user.id, Action.READ, action);
- // Save mobile number
- if (filteredRequest.mobile && user.mobile !== filteredRequest.mobile) {
- user.mobile = filteredRequest.mobile;
- await UserStorage.saveUserMobilePhone(req.tenant, user.id, { mobile: filteredRequest.mobile });
- }
// Set
const endUserErrorNotification: EndUserErrorNotification = {
userID: user.id,
email: user.email,
- phone: user.mobile,
+ phone: filteredRequest?.mobile ?? user?.mobile,
name: Utils.buildUserFullName(user, false, false),
errorTitle: filteredRequest.subject,
errorDescription: filteredRequest.description,

Don't save error report phone and defaut to report phone