Closed j3k0 closed 2 years ago
New page to display the content of a chat room
2 inputs: "user1, user2"
below:
To get the chat, it's ganomede-chat: https://github.com/j3k0/ganomede-chat#room-chatv1authauthtokenroomsroomid
ganomede-chat
Room id is <game_id>/<user1>/<user2>. IMPORTANT user1 and user2 sorted alphabetically.
<game_id>/<user1>/<user2>
If from is $$, show the message in gray.
from
$$
Don't forget to encodeURIComponent the ROOM_ID
encodeURIComponent
Example: <game_id> can be triominos/v1, need to be configurable with env var.
<game_id>
triominos/v1
Connection with ganomede-chat configured with env var.
Task accomplished:
Final-result
Tests added also for the new api, can you please review as well.
New page to display the content of a chat room
2 inputs: "user1, user2"
below:
To get the chat, it's
ganomede-chat
: https://github.com/j3k0/ganomede-chat#room-chatv1authauthtokenroomsroomidRoom id is
<game_id>/<user1>/<user2>
. IMPORTANT user1 and user2 sorted alphabetically.If
from
is$$
, show the message in gray.Don't forget to
encodeURIComponent
the ROOM_IDExample:
<game_id>
can betriominos/v1
, need to be configurable with env var.Connection with ganomede-chat configured with env var.