BBS: show post ID when posted
This commit is contained in:
parent
fffd9059d6
commit
5951d637a9
1 changed files with 2 additions and 2 deletions
|
@ -159,8 +159,8 @@ def handle_command(%{user: user} = state, "n") do
|
||||||
def handle_command(%{user: user} = state, "p " <> text) do
|
def handle_command(%{user: user} = state, "p " <> text) do
|
||||||
text = String.trim(text)
|
text = String.trim(text)
|
||||||
|
|
||||||
with {:ok, _activity} <- CommonAPI.post(user, %{status: text}) do
|
with {:ok, activity} <- CommonAPI.post(user, %{status: text}) do
|
||||||
IO.puts("Posted!")
|
IO.puts("Posted! ID: #{activity.id}")
|
||||||
else
|
else
|
||||||
_e -> IO.puts("Could not post...")
|
_e -> IO.puts("Could not post...")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue