BBS: Some fixes.

This commit is contained in:
lain 2019-03-31 21:53:17 +02:00
parent e3bf6655ba
commit 629ad1766c

View file

@ -91,7 +91,7 @@ def handle_command(state, "home") do
params = params =
%{} %{}
|> Map.put("type", ["Create", "Announce"]) |> Map.put("type", ["Create"])
|> Map.put("blocking_user", user) |> Map.put("blocking_user", user)
|> Map.put("muting_user", user) |> Map.put("muting_user", user)
|> Map.put("user", user) |> Map.put("user", user)
@ -100,7 +100,6 @@ def handle_command(state, "home") do
[user.ap_id | user.following] [user.ap_id | user.following]
|> ActivityPub.fetch_activities(params) |> ActivityPub.fetch_activities(params)
|> ActivityPub.contain_timeline(user) |> ActivityPub.contain_timeline(user)
|> Enum.reverse()
Enum.each(activities, fn activity -> Enum.each(activities, fn activity ->
puts_activity(activity) puts_activity(activity)
@ -109,8 +108,9 @@ def handle_command(state, "home") do
state state
end end
def handle_command(_state, command) do def handle_command(state, command) do
IO.puts("Unknown command '#{command}'") IO.puts("Unknown command '#{command}'")
state
end end
defp wait_input(state, input) do defp wait_input(state, input) do