-
Notifications
You must be signed in to change notification settings - Fork 281
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
User Mention Error #5118
Comments
Are you able to reproduce this in our sample application? (compose or XML) I tried the described steps but it seems to work fine on our end. That error is from backend and it looks like as is you were trying to mention more than 25 users 🤔 . |
Are you doing some own customisation? Can you share the logs? |
@DanielNovak I tried reproducing it in the sample app, but couldn't find a channel with more than 25 users. It appears that seems to be the problem. In my cases, I've only ever tagged (mentioned) single user and have gotten the error. My theory is that after you start typing '@' all users in that channel get saved in a list then sent together with a message to the back-end. I've been testing this with just default component |
This is what request body looks like when sending a message with 1 mentioned user looks like (IDs have been ommited): {
"message":{
"attachments":[
],
"cid":"<messaging_id>",
"html":"",
"id":"<id>",
"mentioned_users":[
"b2f12f8...f2561c",
"873e1ac...9477f5d6",
"3c5adc...b4d037f0d",
"a157197b...fb8138687",
"4da4ac...cbb7a75288",
"576e5...ab8b1bb",
"6809eb...377ebe4",
"291684f...7d15468",
"b0e5107...bfc726",
"244bca70...68292775",
"b063b1b...cbe223f115",
"d53ca9...15d4a",
"168a5a...3448",
"525e...7185545",
"a8f96ce...3c2a9e9",
"5fa509d...1c9907400",
"f8376805...bad616",
"81fe659...6070a",
"eb7a3bfb...23c16b2",
"d6ed9f5...4b6777a",
"389e67...9ea73",
"f0975f...07e158a",
"96df139...3e6f9b1fd",
"6b728c...6fdb4e3d",
"212e9b...3066990ab",
"3cb322...0af34c0a",
"c4084c...cb32406",
"2f4b854...4d4696",
"706bd3...92be07d9",
"fe7a0...cec356c2",
"eb78da...969d26",
"b077a49e...1e12e8",
"8123f...11e3e8",
"c0228a...4369c0",
"dc8b55...743c61a",
"10e4...e9a9d1",
"3068aec...f34",
"5193...536ebb8",
"5531c42...ce34229",
"02cb15...08dc879",
"f2cc80c...f02b7",
"e1d79ca...b3334486",
"b5aac7...6559995",
"b4b7799...1e18456cd",
"fb06d...0c0a9f",
"7752c0b...bed845",
"a21e16...fbf17",
"c639f...bae837e",
"46d682...1b5fbe",
"6b7a958...40ab779",
"a5ca5...9b67f4",
"b9915e...c5c3b750",
"7bd9d...9d4a6a98",
"b22d3e...71d375b1",
"e02942...c2eaa62085",
"511352...94aa8ee",
"036e4e...4810a7b",
"9992...c2f2b52",
"84a46f2...1fe1fc9",
"3e20ed...c1e68ca5",
"7a04d5...f1249",
"c359fc...5373f",
"b3ce85...8856b"
],
"pinned":false,
"shadowed":false,
"show_in_channel":false,
"silent":false,
"text":"@Mention User testing mentions",
"thread_participants":[
]
},
"skip_push":false,
"skip_enrich_url":false
} |
Thank you. I will test this now. |
This seems to work fine even in 25+ channels. Are you maybe overriding The Line 719 in 8ad4b16
And then when you submit the message, the Line 637 in 8ad4b16
This goes through the message text and filters out the So when looking at this it would mean that |
@JanFicko Did you maybe look into this? From our side we don't see any issues yet (also not from other customers). |
Sorry for keeping you waiting, we were away for holidays. Will take another look today/tomorrow and will report back. |
@DanielNovak Okay, I found where the issue is, and it's on our side. Right now we're in the testing phase, and our Devs/QAs are creating a lot of new accounts, so it happened that initial ones had null name field, so So when you want to mention a user, you pick one from the mentioned list pop-up. Afterwards, when user clicks on send button, message gets additionally prepared through Line 52 in 8ad4b16
Which also calls Line 63 in 8ad4b16
And this functions checks message text against all members of the channel: Line 69 in 8ad4b16
And here all users, which have blank name, get added to the mentions user list, as it essentialy checks if text contains As we currently have 66 users with blank user name, this then exceeds maximum 25 mentioned user limit. Thanks for the pointers! We can now handle this error case on our side. |
Thank you for the detailed explanation. I am glad to hear that you fixed it 👍 . |
Describe the bug
When mentioning a user then posting a message an error is returned from BE:
It doesn't specifically matter what you search for, the error is always the same.
If a normal message is posted (without any mentions) it works fine.
SDK version
stream-chat-android-compose
+stream-chat-android-offline
)To Reproduce
Steps to reproduce the behavior:
Expected behavior
A message with mentioned user should be posted in the message list.
Device:
Screenshots

The text was updated successfully, but these errors were encountered: