You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sending private messages with the @ syntax (@<user> <message>) should trigger on names. Currently triggers on User IDs (that are not visible in the browser window)
I noted the same a while ago. Tim said, that this part of the code was originally only meant for easier debugging.
The most logical thing would probably be to translate the name to id, directly where it is received in send-message.js. The variable user map, is instantiated when displaying the current users of a room.
Disadvantages when using this variable would be, that it only contains the users inside a room, so when someone tries to address someone in a different room, normally they received an error User <id> is not in this room, but in this way, they would receive the error User "" does not exist. And I think some time in the future one might allow writing messages to users in other rooms, then there would be two places in the code that need updating.
The resolution of the passed receiver happens here:
At the moment names are not restricted to be unique. One would definitely have to change this. Also for the last approach, names should not take the form of ids, so one would have to add the restriction, that names can't only be numbers.
Sending private messages with the
@
syntax (@<user> <message>
) should trigger on names. Currently triggers on User IDs (that are not visible in the browser window)cf.
slurk/slurk/views/static/plugins/send-message.js
Lines 17 to 18 in df284b5
slurk/slurk/views/static/plugins/send-message.js
Line 34 in df284b5
slurk/slurk/views/static/js/plugins.js
Lines 132 to 133 in df284b5
The text was updated successfully, but these errors were encountered: