mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
the private message stream is different to normal streams, improving the ui a bit and collapsing conversations
This commit is contained in:
@ -2,14 +2,22 @@ class UserActionsController < ApplicationController
|
||||
def index
|
||||
requires_parameters(:user_id)
|
||||
per_chunk = 60
|
||||
render json: UserAction.stream(
|
||||
|
||||
opts = {
|
||||
user_id: params[:user_id].to_i,
|
||||
offset: params[:offset],
|
||||
limit: per_chunk,
|
||||
action_types: (params[:filter] || "").split(","),
|
||||
action_types: (params[:filter] || "").split(",").map(&:to_i),
|
||||
guardian: guardian,
|
||||
ignore_private_messages: params[:filter] ? false : true
|
||||
)
|
||||
}
|
||||
|
||||
if opts[:action_types] == [UserAction::GOT_PRIVATE_MESSAGE] ||
|
||||
opts[:action_types] == [UserAction::NEW_PRIVATE_MESSAGE]
|
||||
render json: UserAction.private_message_stream(opts[:action_types][0], opts)
|
||||
else
|
||||
render json: UserAction.stream(opts)
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
|
Reference in New Issue
Block a user