Description
When a user write in a channel, he will send a web socket event to notifie the other in realtime that he is writing. To not flood the web socket with a lot of event 3 rules have been define
- User continuously writing will send an event with writing to true every 10 seconde
- When the user stop writing after 0,5 seconde an event with writing to false is send
- When the user writing lose is connexion will typing he will not send a event to notifie that he stop writing. So on the receiver side after 10 seconde, the user is defined to not writing anymore
Type of event
WritingEvent = {
type: 'writing';
event: {
channel_id: string;
thread_id: string;
user_id: string;
name: string;
is_writing: boolean;
};
};