onGroupNotificationMessage static method
void
onGroupNotificationMessage(
- dynamic event
Implementation
static void onGroupNotificationMessage(event) {
debugPrint('onGroupNotificationMessage $event');
ChatMessageModel chatMessageModel = sendMessageModelFromJson(event);
if (SessionManagement.getCurrentChatJID() ==
chatMessageModel.chatUserJid.checkNull()) {
debugPrint("Message Received group chat screen is in online");
} else {
var data = chatMessageFromJson(event.toString());
debugPrint("notificationMadeByME ${notificationMadeByME(data)}");
//checked own notification for (if group notification made by me like group member add,remove)
if (data.messageId.isNotEmpty && !notificationMadeByME(data)) {
// NotificationBuilder.createNotification(data);
}
// showLocalNotification(chatMessageModel);
}
if (Get.isRegistered<DashboardController>()) {
Get.find<DashboardController>().onMessageReceived(chatMessageModel);
}
if (Get.isRegistered<ArchivedChatListController>()) {
Get.find<ArchivedChatListController>()
.onMessageReceived(chatMessageModel);
}
if (Get.isRegistered<ChatController>(tag: controllerTag)) {
Get.find<ChatController>(tag: controllerTag)
.onMessageReceived(chatMessageModel);
}
}