sendMessage method

  1. @override
Future<void> sendMessage(
  1. AppModel app,
  2. String memberId,
  3. String assigneeId,
  4. String message, {
  5. Action? postSendAction,
})
override

Implementation

@override
Future<void> sendMessage(
    AppModel app, String memberId, String assigneeId, String message,
    {Action? postSendAction}) async {
  await AbstractRepositorySingleton.singleton
      .notificationRepository(app.documentID)!
      .add(NotificationModel(
          documentID: newRandomKey(),
          appId: app.documentID,
          description: message,
          read: false,
          status: NotificationStatus.open,
          assigneeId: assigneeId,
          reporterId: memberId))
      .then((value) {
    if (postSendAction != null) {
      postSendAction(value);
    }
  });
}