diff options
author | pdp8 <pdp8@pdp8.info> | 2023-09-14 21:14:29 +0200 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2023-09-14 21:14:29 +0200 |
commit | 4dabdfb47154014f491462b026882102b5e668e3 (patch) | |
tree | 2303f69d1eb42372264c878731fb7c908e28ec18 | |
parent | 44967ae9f605ca37b6d88e4e8b11a9cf1fdc2b57 (diff) |
mention for mastodon DM
-rw-r--r-- | create.rb | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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', |