Skip to content

Commit

Permalink
Log if we received push event in old format
Browse files Browse the repository at this point in the history
  • Loading branch information
iwiznia committed Jan 25, 2024
1 parent 95631f6 commit 2ee6e1a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libs/actions/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type {OnyxEntry} from 'react-native-onyx/lib/types';
import type {ValueOf} from 'type-fest';
import * as API from '@libs/API';
import * as ErrorUtils from '@libs/ErrorUtils';
import Log from '@libs/Log';
import Navigation from '@libs/Navigation/Navigation';
import * as SequentialQueue from '@libs/Network/SequentialQueue';
import * as Pusher from '@libs/Pusher/pusher';
Expand Down Expand Up @@ -490,6 +491,7 @@ function subscribeToUserEvents() {
// - The data is an object, containing updateIDs from the server and an array of onyx updates (this array is the same format as the original format above)
// Example: {lastUpdateID: 1, previousUpdateID: 0, updates: [{onyxMethod: 'whatever', key: 'foo', value: 'bar'}]}
if (Array.isArray(pushJSON)) {
Log.warn('Received pusher event with array format');
pushJSON.forEach((multipleEvent) => {
PusherUtils.triggerMultiEventHandler(multipleEvent.eventType, multipleEvent.data);
});
Expand Down

0 comments on commit 2ee6e1a

Please sign in to comment.