mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Cook drafts excerpt in user activity (#14315)
The previous excerpt was a simple truncated raw message. Starting with this commit, the raw content of the draft is cooked and an excerpt is extracted from it. The logic for extracting the excerpt mimics the the `ExcerptParser` class, but does not implement all functionality, being a much simpler implementation. The two draft controllers have been merged into one and the /draft.json route has been changed to /drafts.json to be consistent with the other route names.
This commit is contained in:
@@ -478,7 +478,7 @@ RSpec.describe SessionController do
|
||||
UserAuthToken.destroy_all
|
||||
|
||||
# we need a route that will call current user
|
||||
post '/draft.json', params: {}
|
||||
post '/drafts.json', params: {}
|
||||
expect(response.headers['Discourse-Logged-Out']).to eq("1")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user