@@ -492,7 +492,7 @@ function addActions(reportID: string, text = '', file?: FileObject) {
492
492
493
493
if ( shouldUpdateNotificationPrefernece ) {
494
494
optimisticReport . participants = {
495
- [ currentUserAccountID ] : { notificationPreference : CONST . REPORT . NOTIFICATION_PREFERENCE . ALWAYS } ,
495
+ [ currentUserAccountID ] : { notificationPreference : ReportUtils . getDefaultNotificationPreferenceForReport ( report ) } ,
496
496
} ;
497
497
}
498
498
@@ -548,19 +548,6 @@ function addActions(reportID: string, text = '', file?: FileObject) {
548
548
} ,
549
549
] ;
550
550
551
- if ( shouldUpdateNotificationPrefernece ) {
552
- // optimisticReport.notificationPreference = CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS;
553
- successData . push ( {
554
- onyxMethod : Onyx . METHOD . MERGE ,
555
- key : `${ ONYXKEYS . COLLECTION . REPORT } ${ reportID } ` ,
556
- value : {
557
- participants : {
558
- [ currentUserAccountID ] : { notificationPreference : CONST . REPORT . NOTIFICATION_PREFERENCE . ALWAYS } ,
559
- } ,
560
- } ,
561
- } ) ;
562
- }
563
-
564
551
let failureReport : Partial < Report > = {
565
552
lastMessageTranslationKey : '' ,
566
553
lastMessageText : '' ,
@@ -2757,7 +2744,7 @@ function joinRoom(report: OnyxEntry<Report>) {
2757
2744
updateNotificationPreference (
2758
2745
report . reportID ,
2759
2746
ReportUtils . getReportNotificationPreference ( report ) ,
2760
- CONST . REPORT . NOTIFICATION_PREFERENCE . ALWAYS ,
2747
+ ReportUtils . getDefaultNotificationPreferenceForReport ( report ) ,
2761
2748
report . parentReportID ,
2762
2749
report . parentReportActionID ,
2763
2750
) ;
0 commit comments