fix(push-notification-receiver): check if status is null before doing stuff

This commit is contained in:
LucasGGamerM 2024-04-18 13:42:45 -03:00
parent 849172ad7f
commit d5cd016776
1 changed files with 5 additions and 1 deletions

View File

@ -133,7 +133,11 @@ public class PushNotificationReceiver extends BroadcastReceiver{
if(intent.hasExtra("notification")){
org.joinmastodon.android.model.Notification notification=Parcels.unwrap(intent.getParcelableExtra("notification"));
String statusID=notification.status.id;
String statusID = null;
if(notification != null && notification.status != null)
statusID=notification.status.id;
if (statusID != null) {
AccountSessionManager accountSessionManager = AccountSessionManager.getInstance();
Preferences preferences = accountSessionManager.getAccount(accountID).preferences;