CommonAPI: add emoji to user source data on update
This commit is contained in:
parent
8c0c930041
commit
f9d13558c8
4 changed files with 56 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
defmodule Pleroma.Web.CommonAPI.Test do
|
||||
use Pleroma.DataCase
|
||||
alias Pleroma.Web.CommonAPI
|
||||
alias Pleroma.User
|
||||
|
||||
import Pleroma.Factory
|
||||
|
||||
|
|
@ -10,4 +11,14 @@ defmodule Pleroma.Web.CommonAPI.Test do
|
|||
|
||||
assert activity.data["object"]["tag"] == ["2hu"]
|
||||
end
|
||||
|
||||
test "it adds emoji when updating profiles" do
|
||||
user = insert(:user, %{name: ":karjalanpiirakka:"})
|
||||
|
||||
CommonAPI.update(user)
|
||||
user = User.get_cached_by_ap_id(user.ap_id)
|
||||
[karjalanpiirakka] = user.info["source_data"]["tag"]
|
||||
|
||||
assert karjalanpiirakka["name"] == ":karjalanpiirakka:"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue