Skip to content

Instantly share code, notes, and snippets.

@Teepheh-Git
Created July 14, 2023 07:21
Show Gist options
  • Save Teepheh-Git/0bb56e4e8d68c80dc43d08047eb0b98c to your computer and use it in GitHub Desktop.
Save Teepheh-Git/0bb56e4e8d68c80dc43d08047eb0b98c to your computer and use it in GitHub Desktop.
const readReceipt = async () => {
const readMessage = () => {
if (!socketRef.current) {
return;
}
socketRef.current.emit('readMessage', {message_id: '1', user_id: '7'});
};
};
const sendMessage = url => {
if (!socketRef.current) {
return;
}
socketRef.current.emit('sendMessage', {
user_id: user.id,
message_text: myMessage,
audio_file: 'null',
image_url: url,
group_id: groupId,
});
setMyMessage('');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment