Skip to content

Commit

Permalink
Revert "fix(client/messages): remove unused code flow"
Browse files Browse the repository at this point in the history
This reverts commit d6057c6.
  • Loading branch information
TasoOneAsia committed Dec 8, 2021
1 parent 43610c5 commit 21a80da
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion resources/client/cl_messages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { CreateMessageBroadcast, MessageEvents } from '../../typings/messages';
import {
CreateMessageBroadcast,
MessageConversationResponse,
MessageEvents,
PreDBMessage,
} from '../../typings/messages';
import { sendMessageEvent } from '../utils/messages';
import { RegisterNuiProxy } from './cl_utils';

Expand All @@ -10,6 +15,14 @@ RegisterNuiProxy(MessageEvents.DELETE_CONVERSATION);
RegisterNuiProxy(MessageEvents.SEND_MESSAGE);
/*RegisterNuiProxy(MessageEvents.SET_MESSAGE_READ);*/

onNet(MessageEvents.SEND_MESSAGE_SUCCESS, (messageDto: PreDBMessage) => {
sendMessageEvent(MessageEvents.SEND_MESSAGE_SUCCESS, messageDto);
});

onNet(MessageEvents.CREATE_MESSAGE_BROADCAST, (result: CreateMessageBroadcast) => {
sendMessageEvent(MessageEvents.CREATE_MESSAGE_BROADCAST, result);
});

onNet(MessageEvents.CREATE_MESSAGE_CONVERSATION_SUCCESS, (result: MessageConversationResponse) => {
sendMessageEvent(MessageEvents.CREATE_MESSAGE_CONVERSATION_SUCCESS, result);
});

0 comments on commit 21a80da

Please sign in to comment.