Skip to content

Commit

Permalink
Log both current and original priority for FCM messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal committed Feb 16, 2021
1 parent 267f759 commit 0dea5eb
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@
import org.thoughtcrime.securesms.registration.PushChallengeRequest;
import org.thoughtcrime.securesms.util.TextSecurePreferences;

import java.util.Locale;

public class FcmReceiveService extends FirebaseMessagingService {

private static final String TAG = FcmReceiveService.class.getSimpleName();


@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Log.i(TAG, "onMessageReceived() ID: " + remoteMessage.getMessageId() + ", Delay: " + (System.currentTimeMillis() - remoteMessage.getSentTime()) + ", Original Priority: " + remoteMessage.getOriginalPriority());
Log.i(TAG, String.format(Locale.US,
"onMessageReceived() ID: %s, Delay: %d, Priority: %d, Original Priority: %d",
remoteMessage.getMessageId(),
(System.currentTimeMillis() - remoteMessage.getSentTime()),
remoteMessage.getPriority(),
remoteMessage.getOriginalPriority()));

String challenge = remoteMessage.getData().get("challenge");
if (challenge != null) {
Expand Down

0 comments on commit 0dea5eb

Please sign in to comment.