Tweaks / Message notifications (#174)

* Remove msg notifications when opening one | Dont alert notifications when inside that conversation

* Fix msg events

* Fix goToConversation util

* Fix nuiEvents for messages
This commit is contained in:
J Francisco Rader authored and GitHub committed 2021-03-22 18:57:20 -03:00
1 parent b42ee97450
commit a3d7c19f44
3 files changed
+33 -11

No files matched your search

@@ -1,7 +1,8 @@
import { MessageEvents } from '../../../../../typings/messages';
import Nui from '../../../os/nui-events/utils/Nui';
export const goToConversation = (messageGroup, history) => {
if (!messageGroup?.groupId || !history) return;
history.push(`/messages/conversations/${messageGroup.groupId}`);
Nui.send('phone:fetchMessages', { groupId: messageGroup.groupId });
Nui.send(MessageEvents.FETCH_MESSAGES, { groupId: messageGroup.groupId });
};