Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat #2

Closed
bennyboer opened this issue Oct 23, 2020 · 2 comments
Closed

Chat #2

bennyboer opened this issue Oct 23, 2020 · 2 comments

Comments

@bennyboer
Copy link
Owner

No description provided.

@bennyboer bennyboer added this to Planned in First prototype Oct 23, 2020
@bennyboer bennyboer moved this from Planned to To do in First prototype Oct 27, 2020
@bennyboer bennyboer self-assigned this Oct 27, 2020
@bennyboer
Copy link
Owner Author

bennyboer commented Oct 27, 2020

Message examples send over the main websocket

Send message on the main chat

["{\"msg\":\"method\",\"method\":\"sendGroupChatMsg\",\"params\":[\"MAIN-PUBLIC-GROUP-CHAT\",{\"color\":\"0\",\"correlationId\":\"w_nm1igpmdef4j-1603809410511\",\"sender\":{\"id\":\"w_nm1igpmdef4j\",\"name\":\"Benjamin Eder\"},\"message\":\"test\"}],\"id\":\"33\"}"]

correlationId seems to consist of user Id and part of the room, meetingID or conference property values taken from the meeting info object.
Example of the room property value: c06ad32fcd078f2f198e669d8ab1d54674cd7f27-1603807482120.
We can obtain it by splitting that value using -.

When writing private chat:

["{\"msg\":\"method\",\"method\":\"sendGroupChatMsg\",\"params\":[\"1603810106003-8r72f43d\",{\"color\":\"0\",\"correlationId\":\"w_udpv0ujkbhej-1603810108521\",\"sender\":{\"id\":\"w_udpv0ujkbhej\",\"name\":\"Benjamin Eder\"},\"message\":\"test\"}],\"id\":\"34\"}"]

Start user typing

["{\"msg\":\"method\",\"method\":\"startUserTyping\",\"params\":[\"public\"],\"id\":\"32\"}"]

When in private chat the correct params need to be send (User ID):

["{\"msg\":\"method\",\"method\":\"startUserTyping\",\"params\":[\"w_nfjzqhfzx0qm\"],\"id\":\"33\"}"]

Stop user typing

["{\"msg\":\"method\",\"method\":\"stopUserTyping\",\"params\":[],\"id\":\"34\"}"]

Create private chat

["{\"msg\":\"method\",\"method\":\"createGroupChat\",\"params\":[{\"_id\":\"wwA2Eq4PworQgGAhL\",\"meetingId\":\"cb90edcbddb16dcf8470c8306f985ecbb3dd420d-1603802052026\",\"userId\":\"w_nfjzqhfzx0qm\",\"clientType\":\"HTML5\",\"validated\":true,\"connectionId\":\"2EtxuT9T6vo3JCLNG\",\"approved\":true,\"loginTime\":1603807304446,\"inactivityCheck\":false,\"connectionStatus\":\"online\",\"sortName\":\"konstantin schlosser\",\"color\":\"#512da8\",\"breakoutProps\":{\"isBreakoutUser\":false,\"parentId\":\"bbb-none\"},\"effectiveConnectionType\":null,\"responseDelay\":0,\"loggedOut\":false,\"intId\":\"w_nfjzqhfzx0qm\",\"extId\":\"gl-guest-2acb434c9b0839b9f8f86128\",\"name\":\"Konstantin Schlosser\",\"role\":\"VIEWER\",\"guest\":false,\"authed\":true,\"guestStatus\":\"ALLOW\",\"emoji\":\"none\",\"presenter\":false,\"locked\":true,\"avatar\":\"https://bbb2.cs.hm.edu/client/avatar.png\"}],\"id\":\"29\"}"]

TODO: Where does the id wwA2Eq4PworQgGAhL come from? Random string with length 17?

Subscribe to a chat topic in the main websocket

["{\"msg\":\"sub\",\"id\":\"9wJSfGtDHNr2Y5gRZ\",\"name\":\"group-chat-msg\",\"params\":[[]]}"]

Where id is a random alphanumeric string of length 17

When subscribing to a private chat:

["{\"msg\":\"sub\",\"id\":\"NXPJ6SsWn4B8XGcaC\",\"name\":\"group-chat-msg\",\"params\":[[\"1603810106003-8r72f43d\"]]}"]

Getting a chat collection message after subscribing

a["{\"msg\":\"added\",\"collection\":\"group-chat\",\"id\":\"GP5FeAHXsSimgsHQK\",\"fields\":{\"chatId\":\"MAIN-PUBLIC-GROUP-CHAT\",\"meetingId\":\"cb90edcbddb16dcf8470c8306f985ecbb3dd420d-1603802052026\",\"name\":\"MAIN-PUBLIC-GROUP-CHAT\",\"access\":\"PUBLIC_ACCESS\",\"users\":[],\"createdBy\":\"SYSTEM\"}}"]

For private chat:

a["{\"msg\":\"added\",\"collection\":\"group-chat\",\"id\":\"ndFM8gykp8vBJhPzy\",\"fields\":{\"chatId\":\"1603810106003-8r72f43d\",\"meetingId\":\"cb90edcbddb16dcf8470c8306f985ecbb3dd420d-1603802052026\",\"name\":\"Konstantin Schlosser\",\"access\":\"PRIVATE_ACCESS\",\"users\":[\"w_nfjzqhfzx0qm\",\"w_udpv0ujkbhej\"],\"createdBy\":\"w_udpv0ujkbhej\"}}"]

Receiving a message

a["{\"msg\":\"added\",\"collection\":\"group-chat-msg\",\"id\":\"W2CJrWJTN4GKmygEc\",\"fields\":{\"chatId\":\"MAIN-PUBLIC-GROUP-CHAT\",\"id\":\"1603809409682-m27u3wkn\",\"meetingId\":\"c06ad32fcd078f2f198e669d8ab1d54674cd7f27-1603807482120\",\"timestamp\":1603809409682,\"correlationId\":\"w_nm1igpmdef4j-1603809410511\",\"sender\":\"w_nm1igpmdef4j\",\"color\":\"0\",\"message\":\"test\"}}"]

Receiving "user is typing" updates

Add user is typing:

a["{\"msg\":\"added\",\"collection\":\"users-typing\",\"id\":\"eiMRQXLrSXT8GyPrC\",\"fields\":{\"meetingId\":\"c06ad32fcd078f2f198e669d8ab1d54674cd7f27-1603807482120\",\"userId\":\"w_nm1igpmdef4j\",\"name\":\"Benjamin Eder\",\"isTypingTo\":\"public\",\"role\":\"MODERATOR\",\"time\":{\"$date\":1603809408226}}}"]

Remove user is typing:

a["{\"msg\":\"removed\",\"collection\":\"users-typing\",\"id\":\"eiMRQXLrSXT8GyPrC\"}"]

@bennyboer bennyboer moved this from To do to Doing in First prototype Oct 27, 2020
@bennyboer
Copy link
Owner Author

Seems like the correlationId is just info for the client (See bigbluebutton/bigbluebutton#4987)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant