Please provide way for rejecting
Hi, Thanks your working for mostr. I like mostr architecture. But some of people on nostr does not want to be subscribed from another SNSs. I think that nostr should be closed community than another SNS since nostr does not have feature that to be private account. So how about to add feature to disable activityPub that using metadata attributes? This attributes can be added on profile page on "iris.to".
diff --git a/src/nostr/publisher.ts b/src/nostr/publisher.ts
index d426683..e6286df 100644
--- a/src/nostr/publisher.ts
+++ b/src/nostr/publisher.ts
@@ -42,8 +42,9 @@ function maybePublishActor(actor: Actor) {
}
async function publishActor(actor: Actor) {
- publishedActors.add(actor.id);
const event = await toEvent0(actor);
+ if (event.activityPub === 'disabled') return;
+ publishedActors.add(actor.id);
cipher.add({ apId: actor.id, nostrId: event.pubkey });
publish(event);
}
diff --git a/src/nostr/schema.ts b/src/nostr/schema.ts
index 3d35f25..99fb9d7 100644
--- a/src/nostr/schema.ts
+++ b/src/nostr/schema.ts
@@ -9,6 +9,7 @@ const metaContentSchema = z.object({
banner: optionalString,
nip05: optionalString,
lud16: optionalString,
+ activityPub: optionalString,
});
type MetaContent = z.infer<typeof metaContentSchema>;
diff --git a/src/nostr/transmute.ts b/src/nostr/transmute.ts
index 6bb437b..859a60b 100644
--- a/src/nostr/transmute.ts
+++ b/src/nostr/transmute.ts
@@ -34,6 +34,7 @@ async function toEvent0(actor: Actor): Promise<Event<0>> {
banner: actor.image?.url,
nip05: getNip05(actor),
lud16: z.string().email().safeParse(lud16).success ? lud16 : undefined,
+ activityPub: actor.activityPub,
};
const event: Event<0> = {
Edited by mattn