fix(compose): add to/cc addressing to quick reply Notes
Remote servers (Mastodon, etc.) require explicit audience addressing to display a post. Without to/cc, the Note was silently discarded. - to: as:Public (visible to everyone) - cc: followers collection
This commit is contained in:
@@ -198,12 +198,15 @@ export function submitComposeController(mountPath, plugin) {
|
|||||||
const noteId = `urn:uuid:${crypto.randomUUID()}`;
|
const noteId = `urn:uuid:${crypto.randomUUID()}`;
|
||||||
const actorUri = ctx.getActorUri(handle);
|
const actorUri = ctx.getActorUri(handle);
|
||||||
|
|
||||||
|
const followersUri = ctx.getFollowersUri(handle);
|
||||||
const note = new Note({
|
const note = new Note({
|
||||||
id: new URL(noteId),
|
id: new URL(noteId),
|
||||||
attribution: actorUri,
|
attribution: actorUri,
|
||||||
content: content.trim(),
|
content: content.trim(),
|
||||||
inReplyTo: inReplyTo ? new URL(inReplyTo) : undefined,
|
inReplyTo: inReplyTo ? new URL(inReplyTo) : undefined,
|
||||||
published: Temporal.Now.instant(),
|
published: Temporal.Now.instant(),
|
||||||
|
to: new URL("https://www.w3.org/ns/activitystreams#Public"),
|
||||||
|
cc: followersUri,
|
||||||
});
|
});
|
||||||
|
|
||||||
const create = new Create({
|
const create = new Create({
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@rmdes/indiekit-endpoint-activitypub",
|
"name": "@rmdes/indiekit-endpoint-activitypub",
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
|
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"indiekit",
|
"indiekit",
|
||||||
|
|||||||
Reference in New Issue
Block a user