summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--create.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/create.rb b/create.rb
index 40e1357..0798ba1 100644
--- a/create.rb
+++ b/create.rb
@@ -67,6 +67,16 @@ post '/create' do
end
end
+ # https://docs.joinmastodon.org/spec/activitypub/#Mention
+ if to.size == 1 # mastodon DM
+ m = {
+ 'type' => 'Mention',
+ 'href' => to[0],
+ 'name' => mention(to[0])
+ }
+ tag << m unless tag.include? m
+ end
+
object = {
'to' => to,
'type' => 'Note',