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

Connect chat functionality #35

Closed
10 tasks done
thaije opened this issue Feb 6, 2020 · 1 comment
Closed
10 tasks done

Connect chat functionality #35

thaije opened this issue Feb 6, 2020 · 1 comment

Comments

@thaije
Copy link
Collaborator

thaije commented Feb 6, 2020

  • Initialize Add button listing all possible agents to chat with on startup
  • Add chatmessage manager in MATRX
  • Create chatmessage manager API handle
  • Push new messages from MATRX to frontend
  • Dynamically add new messages / message groups
  • Notification for messages in un-opened chat rooms
  • Load all known messages on page load
  • Fetch all messages from the server on page load
  • Initialize chat groups and chat messages on pageload
  • Connect sending message in frontend to backend
@thaije
Copy link
Collaborator Author

thaije commented Feb 19, 2020

The behaviour of the chat per type of agent:

  • God: can view all global and team messages, but send none. The God cannot see private conversations, as the way chatrooms are handled for private rooms (ID of other agent) makes it more difficult for the god view (x private rooms with the same ID / name). This might be fixed in the future if there is a desire for / time.
  • Agent: can view messages sent to it, but send none.
  • Human agent: can view messages sent to and by it, and also send messages itself to other agents via an input field. When the user has focussed (clicked) on the input field, any keypresses are not sent to MATRX as userinput. When a human-agent sends a message, it is sent to the MATRX server. When it is received back and confirmed, only then the message is displayed in the chat. This can result in a delay for long tick_durations, but is more transparent to the user, as only confirmed messages are displayed (e.g. two checkmarks in Whatsapp).

There are three types of chatrooms:

  • global: messages send to all agents.
  • team: messages send to a team. Agents can only receive or sent messages to a team of which they are part.
  • private: 1-to-1 conversations between two (human-)agents. Label for private chatrooms in the GUI is the ID of the other person.

When the agent receives a message in a chatroom which is not in the chatlist yet, that chatroom is automatically added to the list (closed). In addition, new messages to closed chatrooms are signaled to the user with a orange small circle.

Messages in the global and team chats sent by others are prefixed with the sender ID, as there is no way of finding out the sender otherwise.

By default, an agent was put in a team with itself if no team was assigned to it in the scenario. The teamname of that team the agent ID, but has been changed to: agent name + "_team". As otherwise it was impossible to see which chatroom was a private chat or which the "team" chat.

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

No branches or pull requests

1 participant