-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for publishing mentions #493
Comments
Yes! Great point, and BF already does the other direction, AP => wm (background in eg #270), so it should absolutely do this too. |
More motivation for this: the emerging standard way to do groups on the fediverse is evidently accounts that automatically repost you when you mention them, eg https://venera.social/profile/activitypubblueskybridge |
I've been trying to get this to work with a Friendica group, which works by reposting your posts that mention it, but no luck so far. Here are all the different AS2 "tag": [{
"type": "Mention",
"id": "https://venera.social/profile/activitypubblueskybridge",
"name": "AP-AT-Bridge Group"
}] "tag": [{
"type": "Mention",
"id": "https://venera.social/profile/activitypubblueskybridge",
"url": "https://venera.social/profile/activitypubblueskybridge",
"name": "@[email protected]"
}] "tag": [{
"type": "Mention",
"id": "https://venera.social/profile/activitypubblueskybridge",
"url": "https://venera.social/profile/activitypubblueskybridge",
"href": "https://venera.social/profile/activitypubblueskybridge",
"name": "@[email protected]"
}] ...all with "to": [
"https://www.w3.org/ns/activitystreams#Public",
"https://venera.social/profile/activitypubblueskybridge"
] 🤷 🤷 🤷 |
Mastodon docs for mentions: https://docs.joinmastodon.org/spec/activitypub/#Mention I guess I could try some of the above ^ examples with |
Tried again with Next step is to hope @manton can help, he evidently has outgoing fediverse mentions working in micro.blog! {
"id": "https://fed.brid.gy/r/https://snarfed.org/2023-10-12_snarfed-foo-bar-mas-to#bridgy-fed-update-2023-10-12T23:44:49.320885+00:00",
"actor": "https://fed.brid.gy/snarfed.org",
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Update",
"object": {
"updated": "2023-10-12T23:44:49.320885+00:00",
"published": "2023-10-12T16:35:43-07:00",
"content": "hi again to <a href=\"https://indieweb.social/users/snarfed\">@[email protected]</a> <a class=\"u-in-reply-to\" href=\"https://mas.to/@snarfed/109668310494520038\"> </a>",
"url": "https://fed.brid.gy/r/https://snarfed.org/2023-10-12_snarfed-foo-bar-mas-to",
"id": "https://fed.brid.gy/r/https://snarfed.org/2023-10-12_snarfed-foo-bar-mas-to",
"type": "Note",
"attributedTo": "https://fed.brid.gy/snarfed.org",
"inReplyTo": "https://mas.to/users/snarfed/statuses/109668310494520038",
"tag": [
{
"type": "Mention",
"href": "https://indieweb.social/users/snarfed",
"name": "@[email protected]"
},
{
"type": "Mention",
"href": "https://mas.to/users/snarfed"
}
],
"cc": [
"https://indieweb.social/users/snarfed",
"https://mas.to/users/snarfed",
"https://www.w3.org/ns/activitystreams#Public",
"https://mas.to/users/snarfed/followers"
],
"to": [
"https://www.w3.org/ns/activitystreams#Public"
]
},
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://indieweb.social/users/snarfed",
"https://mas.to/users/snarfed",
"https://www.w3.org/ns/activitystreams#Public",
"https://mas.to/users/snarfed/followers"
],
} |
I just tested this in Micro.blog and it's working. One thing I noticed in your example above, the type = "Update". Why not "Create"? Maybe Mastodon is confused by that. Here's the JSON for sending an @-mention from the test account @[email protected] to @[email protected]: {
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"id": "https://micro.blog/activitypub/ids/19f285fd5759d3170732",
"actor": "https://micro.blog/activitypub/mantondroid",
"object": {
"id": "https://micro.blog/activitypub/posts/24869106",
"type": "Note",
"url": "https://mantondroid.micro.blog/2023/10/13/testing-a-mention.html",
"published": "2023-10-13T13:49:49+00:00",
"attributedTo": "https://micro.blog/activitypub/mantondroid",
"tag": [
{
"type": "Mention",
"href": "https://indieweb.social/users/manton",
"name": "@[email protected]"
}
],
"content": "<p>Testing a mention to Mastodon. Hi <a href=\"https://indieweb.social/users/manton\">@[email protected]</a>. \ud83d\udc4b</p>",
"attachment": [],
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://micro.blog/activitypub/mantondroid/followers",
"https://indieweb.social/users/manton"
]
}
} |
This is also a new post, not a reply to anything specific, so I don't include |
Not sure if this matters, but why have the empty link username for the second Mastodon user that is mentioned? |
Woo, this is working! I honestly don't know what fixed it, but I won't argue. Docs are deploying now. Thank you @manton! (Re your q's, I'd tried with |
One silver lining of Mastodon's support here is that the AS2 |
Reopening, this isn't working with Friendica groups, eg https://venera.social/profile/activitypubblueskybridge , which repost ( {
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"id": "https://fed.brid.gy/r/https://snarfed.org/2023-10-20_51173#bridgy-fed-create",
"actor": "https://fed.brid.gy/snarfed.org",
"published": "2023-10-20T19:27:57.093008+00:00",
"object": {
"type": "Note",
"id": "https://fed.brid.gy/r/https://snarfed.org/2023-10-20_51173",
"url": "https://fed.brid.gy/r/https://snarfed.org/2023-10-20_51173",
"published": "2023-10-20T12:01:27-07:00",
"content": "... cc <a href=\"https://venera.social/profile/activitypubblueskybridge\">@[email protected]</a>.</p>",
"attributedTo": "https://fed.brid.gy/snarfed.org",
"tag": [
{
"type": "Mention",
"name": "@[email protected]",
"href": "https://venera.social/profile/activitypubblueskybridge"
}
],
"cc": ["https://venera.social/profile/activitypubblueskybridge"],
"to": ["https://www.w3.org/ns/activitystreams#Public"]
"...",
},
"to": ["https://www.w3.org/ns/activitystreams#Public"]
} |
Here's the most recent post to that group, also trimmed a bit. I don't see an obvious difference yet: the You evidently have to follow the group before you can post to it, which I did a while back, but maybe that follow didn't take? {
"id": "https://indieweb.social/users/tchambers/statuses/111048163021099999",
"type": "Note",
"summary": null,
"published": "2023-09-11T19:28:15Z",
"url": "https://indieweb.social/@tchambers/111048163021099999",
"attributedTo": "https://indieweb.social/users/tchambers",
"to": ["https://www.w3.org/ns/activitystreams#Public"],
"cc": [
"https://indieweb.social/users/tchambers/followers",
"https://venera.social/profile/activitypubblueskybridge",
"https://venera.social/followers/activitypubblueskybridge",
"https://fed.brid.gy/snarfed.org"
],
"conversation": "tag:indieweb.social,2023-09-11:objectId=76434671:objectType=Conversation",
"content": "<p>important work from <span class=\"h-card\" translate=\"no\"><a href=\"https://fed.brid.gy/r/https://snarfed.org/\" class=\"u-url mention\">@<span>snarfed.org</span></a></span> as part of his AP to BlueSky/AT bridge... comparing Nostr, AP, and AT Protocols.... Chime in if anything here needs tweaking or fixing... cc: <span class=\"h-card\" translate=\"no\"><a href=\"https://venera.social/profile/activitypubblueskybridge\" class=\"u-url mention\">@<span>activitypubblueskybridge</span></a></span></p>",
"tag": [
{
"type": "Mention",
"href": "https://fed.brid.gy/snarfed.org",
"name": "@[email protected]"
},
{
"type": "Mention",
"href": "https://venera.social/profile/activitypubblueskybridge",
"name": "@[email protected]"
}
],
"..."
} |
Haven't found anything in Friendica's docs or GitHub issues so far: |
Hmm, that group actually did end up reposting my mention post after all, just a while later, at 21:36:12 UTC, or at least I'm guessing based on this HTML in the repost: <span class="commented" style="display: none;">2023-10-22 02:16:53</span>
<span class="received" style="display: none;">2023-10-20 21:36:12</span>
<span class="created" style="display: none;">2023-10-20 19:01:27</span> Not sure why the delay. But maybe this is working and I can close again after all. |
Following up here. Did some tests, turns out Mastodon's incoming mention handling is pretty relaxed.
So I'm relaxing BF's mention detection in #760. |
I'd like to be able to publish a note to start a conversation with someone (vs replying to a post in a thread). Also handy for tagging someone in a post in an existing thread.
I tried a couple ways a while back but they didn't show up as notifications for the person I mentioned:
https://gregorlove.com/2022/11/hello-from-my-website/ - linked the @-@
https://gregorlove.com/2022/11/hello-again-from-my-website/ - no @-@ link
The text was updated successfully, but these errors were encountered: