Skip to content

Commit

Permalink
show notification when a new user sends a message
Browse files Browse the repository at this point in the history
  • Loading branch information
atillaturkmen committed Apr 30, 2022
1 parent ac1d07b commit 11e9674
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/util/firebase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
var person = messages.get(fromId);
if (person == null) {
print("incoming background message not in friends");
showNotification("a new user", int.parse(fromId));
return;
} else {
showNotification(person.username, int.parse(fromId));
}
//Hive.close();
showNotification(person.username, int.parse(fromId));
}
}

Expand Down

0 comments on commit 11e9674

Please sign in to comment.