Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
1) In the browser: a list of conversation participants is rendered in a JS variable. How depends on requirements. Maybe statically along with the HTML code of the page, maybe dynamically with AJAX, or maybe in "live" mode via WebSocket. The input event handler in the textarea field is assigned the task of displaying a menu of participants at the cursor position if the "dog" @ is pressed (most often it is used for calls). Clicking on the menu item adds the nickname of the interlocutor after "dog"
2) On the server: we get the text and regularly extract substrings of the form "@nickname", collect them and extract from the database of users by nicknames their details, to which we will send notifications (SELECT WHERE IN).
More detailed implementation details appear as you explore the development stack :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question