Skip to content

Commit

Permalink
Merge pull request #24072 from Expensify/arosiclair-refresh-notificat…
Browse files Browse the repository at this point in the history
…ion-logging

[No QA] Log when notifications are received and processed in the background
  • Loading branch information
arosiclair committed Aug 4, 2023
2 parents bba0eb2 + afba1a4 commit c9df4db
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ import PushNotification from '.';
import ROUTES from '../../../ROUTES';
import Log from '../../Log';
import Navigation from '../../Navigation/Navigation';
import Visibility from '../../Visibility';

/**
* Setup reportComment push notification callbacks.
*/
export default function subscribeToReportCommentPushNotifications() {
PushNotification.onReceived(PushNotification.TYPE.REPORT_COMMENT, ({reportID, reportActionID, onyxData}) => {
Log.info('[PushNotification] Handled event sent by Airship', false, {reportID, reportActionID});
Log.info(`[PushNotification] received report comment notification in the ${Visibility.isVisible() ? 'foreground' : 'background'}`, false, {reportID, reportActionID});
Onyx.update(onyxData);
});

Expand Down

0 comments on commit c9df4db

Please sign in to comment.