add reaction IDs in model
This commit is contained in:
parent
03af49798d
commit
41a3d7cb8e
3 changed files with 3 additions and 3 deletions
|
@ -56,7 +56,6 @@ def index(%{assigns: %{user: user}} = conn, params) do
|
||||||
params =
|
params =
|
||||||
Map.new(params, fn {k, v} -> {to_string(k), v} end)
|
Map.new(params, fn {k, v} -> {to_string(k), v} end)
|
||||||
|> Map.put_new("include_types", @default_notification_types)
|
|> Map.put_new("include_types", @default_notification_types)
|
||||||
|
|
||||||
notifications = MastodonAPI.get_notifications(user, params)
|
notifications = MastodonAPI.get_notifications(user, params)
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|
|
|
@ -590,7 +590,8 @@ defp build_emoji_map(emoji, users, url, current_user) do
|
||||||
name: emoji,
|
name: emoji,
|
||||||
count: length(users),
|
count: length(users),
|
||||||
url: MediaProxy.url(url),
|
url: MediaProxy.url(url),
|
||||||
me: !!(current_user && current_user.ap_id in users)
|
me: !!(current_user && current_user.ap_id in users),
|
||||||
|
account_ids: Enum.map(users, fn user -> User.get_cached_by_ap_id(user).id end)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ def websocket_handle(:pong, state) do
|
||||||
# We only receive pings for now
|
# We only receive pings for now
|
||||||
def websocket_handle(:ping, state), do: {:ok, state}
|
def websocket_handle(:ping, state), do: {:ok, state}
|
||||||
|
|
||||||
def websocket_handle({:text, "ping"}, state) do
|
def websocket_handle({:text, ping}, state) when ping in ~w[ping PING] do
|
||||||
if state.timer, do: Process.cancel_timer(state.timer)
|
if state.timer, do: Process.cancel_timer(state.timer)
|
||||||
{:reply, {:text, "pong"}, %{state | timer: timer()}}
|
{:reply, {:text, "pong"}, %{state | timer: timer()}}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue