projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pipeline: Always run common_pipeline in a transaction for now.
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
builder.ex
diff --git
a/lib/pleroma/web/activity_pub/builder.ex
b/lib/pleroma/web/activity_pub/builder.ex
index f0a6c1e1b8eca57fa1a6f4b7eb0ce13413bf705e..7f9c071b33727abb852038a918f13d809ff8498a 100644
(file)
--- a/
lib/pleroma/web/activity_pub/builder.ex
+++ b/
lib/pleroma/web/activity_pub/builder.ex
@@
-5,19
+5,21
@@
defmodule Pleroma.Web.ActivityPub.Builder do
This module encodes our addressing policies and general shape of our objects.
"""
This module encodes our addressing policies and general shape of our objects.
"""
+ alias Pleroma.Emoji
alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.ActivityPub.Visibility
- def create(actor, object
_id
, recipients) do
+ def create(actor, object, recipients) do
{:ok,
%{
"id" => Utils.generate_activity_id(),
"actor" => actor.ap_id,
"to" => recipients,
{:ok,
%{
"id" => Utils.generate_activity_id(),
"actor" => actor.ap_id,
"to" => recipients,
- "object" => object_id,
- "type" => "Create"
+ "object" => object,
+ "type" => "Create",
+ "published" => DateTime.utc_now() |> DateTime.to_iso8601()
}, []}
end
}, []}
end
@@
-28,7
+30,9
@@
defmodule Pleroma.Web.ActivityPub.Builder do
"actor" => actor.ap_id,
"type" => "ChatMessage",
"to" => [recipient],
"actor" => actor.ap_id,
"type" => "ChatMessage",
"to" => [recipient],
- "content" => content
+ "content" => content,
+ "published" => DateTime.utc_now() |> DateTime.to_iso8601(),
+ "emoji" => Emoji.Formatter.get_emoji_map(content)
}, []}
end
}, []}
end