sendNotification method

  1. @override
Future<void> sendNotification(
  1. Message msg,
  2. ChatSilentNotification notification
)
override

Implementation

@override
Future<void> sendNotification(
  Message msg,
  ChatSilentNotification notification,
) async {
  if (me.isEmpty) return;
  final sender = profileFor(me);
  return pushNotification(
    roomId: msg.roomId,
    msgId: msg.id,
    notification: notification.copyWith(
      title: notification.title ?? sender.name ?? 'Someone',
      body: notification.body ?? msg.notificationBody(sender.name),
    ),
  );
}