Using @ breaks adding groups to message

When adding users to a new message, using the @ symbol searches only usernames, not groups.

Is this intentional? Looking back at previous instructions, it seems that we were encouraged to use the @

When trying to send a message to a group, where Everyone is allowed to mention and message the group, you are unable to add them. It appears that if you start with the @ symbol the autocomplete only accepts usernames, even if you add the full name of the group.

If you just enter text however, then the group names do appear

8개의 좋아요

To me this looks like a regression, @j.jaffeux do you recall anything here?

2개의 좋아요

No, it’s not select-kit. And I don’t think I ever touched this.

2개의 좋아요

@nbianca I recall you worked on this selector in the past can you have a look at this issue?

3개의 좋아요

I tried to bisect this, but I had no luck… because this has been broken before v1.8! (I could not install older versions because I had problems with dependencies that were not worth the time) :boom:

Anyway, I got it fixed. The problem is that the query that gets to the server includes @ which seemed to work fine for usernames (Search.ts_query is pretty smart), but did not for groups.

Fixed by

https://github.com/discourse/discourse/pull/6506

7개의 좋아요

Since they both use the same namespace, should they also use the same code path for search (on the server)?

3개의 좋아요

Currently there is search data for users, topic, posts, categories and tags, but none for groups. Implementing it is definitely possible, but I do not think it is worth the effort.

3개의 좋아요

I see, we should at the very least do the same stripping on the server for those who call the API directly.

And maybe give some (ts_query) :heart: to Group.search_groups as well :wink:

2개의 좋아요

At first I implemented the stripping on the server side, but then I realised it isn’t server’s fault. If the client wants correct results, they should ask the correct questions.

2개의 좋아요

This topic was automatically closed after 14 days. New replies are no longer allowed.