mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Prevent unauthorized list of private message titles. Also remove some unused code.
This commit is contained in:
@@ -16,15 +16,7 @@ class UserActionsController < ApplicationController
|
||||
ignore_private_messages: params[:filter] ? false : true
|
||||
}
|
||||
|
||||
stream =
|
||||
if opts[:action_types] == [UserAction::GOT_PRIVATE_MESSAGE] ||
|
||||
opts[:action_types] == [UserAction::NEW_PRIVATE_MESSAGE]
|
||||
UserAction.private_message_stream(opts[:action_types][0], opts)
|
||||
else
|
||||
UserAction.stream(opts)
|
||||
end
|
||||
|
||||
render_serialized(stream, UserActionSerializer, root: "user_actions")
|
||||
render_serialized(UserAction.stream(opts), UserActionSerializer, root: "user_actions")
|
||||
end
|
||||
|
||||
def show
|
||||
|
||||
Reference in New Issue
Block a user