Is your feature request related to a problem? Please describe.
We need a standarized format for wesbsocket communication.
Describe the solution you'd like
{
action: typeName, // Action type, i.e. message
payload: payload, // Payload specific to certain action
date: UNIX timestamp // timestamp of point in time where server registered the event
}
Action IDs and Payload formats for currently implemented responses:
USER_JOINED
{
username: username,
roomId: roomId
}
USER_LEFT
{
username: username,
roomId: roomId
}
MESSAGE
{
author: username,
text: text,
roomId: room id
}
LIST_MEMBERS
{
usernames: [username1, username2 ...],
roomId: room id
}
Is your feature request related to a problem? Please describe. We need a standarized format for wesbsocket communication.
Describe the solution you'd like
Action IDs and Payload formats for currently implemented responses:
USER_JOINED
USER_LEFT
MESSAGE
LIST_MEMBERS
USERS_FOUND
It could be a class or builder function
Describe alternatives you've considered N/A
User story N/A
Additional context N/A