mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: autocomplete usernames early in topic based on participation
Following this change when a user hits `@` and is replying to a topic they
will see usernames of people who were last seen and participated in the topic
This is somewhat experimental, we may tweak this, or make it optional.
Also, a regression in a423a938 where hitting TAB would eat a post you were writing:
Eg this would eat a post:
``` text
@hello, testing 123 <tab>
```
This commit is contained in:
@@ -137,6 +137,11 @@ describe UserSearch do
|
||||
|
||||
results = search_for(staged.username, include_staged_users: true)
|
||||
expect(results.first.username).to eq(staged.username)
|
||||
|
||||
results = search_for("", topic_id: topic.id, searching_user: user1)
|
||||
|
||||
# mrb is omitted, mrb is current user
|
||||
expect(results.map(&:username)).to eq(["mrpink", "mrorange"])
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user