Open shellmage opened 3 years ago
a found that a work-around is to add an empty character like so
emptyChar = '\u200e'
var msg = {
body: emptyChar + 'user',
mentions:
[{
tag: 'user',
id: 0000000000,
}]
}
I don't think this is a bug in the API, I checked the handleMentions i couldn't find anything wrong if someone can confirm this is a server-side bug and not and API bug, just add this note to the docs and close the issue.
What does the browser client do in this case? or is it impossible to send such a message without the API?
it works fine on the browser, this edge-case only happens when using the api when the tag is at offset 0, it doesn't get highlighted as if there was no mentions at all
this is a server-side bug, because the endpoint that this api used is not being used anymore AFAIK (debugging on both latest Chrome and Firefox version), instead everything was moved to MQTT.
btw facebook is using some weird things called LS (send data in /ls_req, receive data & messages (encrypted inside a F***ING FUNCTION) in /ls_resp)
yeah, this (PR #858 ) is basically a work-around for this server-side bug, so that the developers can use this API without thinking about it (I personally wasted quite some time trying to figure out what's the problem and how to work-around it while trying to implement an @everyone group-chat feature
this doesn't work
while this works just fine