Loading docs/manual.md +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ framework. - [Inbox listeners](./manual/inbox.md) - [Collections](./manual/collections.md) - [NodeInfo](./manual/nodeinfo.md) - [Pragmatics](./manual/pragmatics.md) - [Testing](./manual/test.md) However, this manual is not a complete guide to the Fedify framework. Loading docs/manual/pragmatics.md +140 −0 Original line number Diff line number Diff line Loading @@ -249,3 +249,143 @@ For example, the above actor object is displayed like the following in Mastodon:  ### `manuallyApprovesFollowers`: Lock account The `manuallyApprovesFollowers` property is used to *indicate* that the actor manually approves followers. In Mastodon and Misskey, the actor is displayed as a locked account if the `manuallyApprovesFollowers` property is `true`. > [!WARNING] > The `manuallyApprovesFollowers` property only *indicates* that the actor > manually approves followers. The actual behavior of the actor is determined > by the [inbox listener](./inbox.md) for `Follow` activities. > If it automatically sends `Accept` activities right after receiving `Follow`, > the actor behaves as an unlocked account. If it sends `Accept` when the > owner explicitly clicks the *Accept* button, the actor behaves as a locked > account. ~~~~ typescript new Person({ name: "Fedify Demo", preferredUsername: "demo", summary: "This is a Fedify Demo account", manuallyApprovesFollowers: true, // Other properties... }) ~~~~ For example, the above actor object is displayed like the following in Mastodon:  ### `suspended` The `suspended` property is used to suspend an actor in Mastodon. If the `suspended` property is `true`, the profile page of the actor is displayed as suspended. ~~~~ typescript new Person({ name: "Fedify Demo", preferredUsername: "demo", summary: "This is a Fedify Demo account", suspended: true, // Other properties... }) ~~~~ For example, the above actor object is displayed like the following in Mastodon:  ### `memorial` The `memorial` property is used to memorialize an actor in Mastodon. If the `memorial` property is `true`, the profile page of the actor is displayed as memorialized. ~~~~ typescript new Person({ name: "Fedify Demo", preferredUsername: "demo", summary: "This is a Fedify Demo account", memorial: true, // Other properties... }) ~~~~ For example, the above actor object is displayed like the following in Mastodon:  ### `Federation.setFollowingDispatcher()`: Following collection The `Federation.setFollowingDispatcher()` method registers a dispatcher for the collection of actors that the actor follows. The number of the collection is displayed in the profile page of the actor. Each item in the collection is a URI of the actor that the actor follows, or an actor object itself. ~~~~ typescript federation .setFollowingDispatcher( "/users/{handle}/following", async (ctx, handle, cursor) => { // Loads the list of actors that the actor follows... return { items: [ new URL("..."), new URL("..."), // ... ] }; } ) .setCounter((ctx, handle) => 123); ~~~~ For example, the above following collection is displayed like the below in Mastodon:  > [!NOTE] > Mastodon does not display the following collection of a remote actor, > but other ActivityPub implementations may display it. ### `Federation.setFollowersDispatcher()`: Followers collection The `Federation.setFollowersDispatcher()` method registers a dispatcher for the collection of actors that follow the actor. The number of the collection is displayed in the profile page of the actor. Each item in the collection is a URI of the actor that follows the actor, or an actor object itself. ~~~~ typescript federation .setFollowersDispatcher( "/users/{handle}/followers", async (ctx, handle, cursor) => { // Loads the list of actors that follow the actor... return { items: [ new URL("..."), new URL("..."), // ... ] }; } ) .setCounter((ctx, handle) => 456); ~~~~ For example, the above followers collection is displayed like the below in Mastodon:  > [!NOTE] > Mastodon does not display the followers collection of a remote actor, > but other ActivityPub implementations may display it. docs/manual/pragmatics/mastodon-followers.png 0 → 100644 +56.8 KiB Loading image diff... docs/manual/pragmatics/mastodon-following.png 0 → 100644 +57.6 KiB Loading image diff... docs/manual/pragmatics/mastodon-lock.png 0 → 100644 +57 KiB Loading image diff... Loading
docs/manual.md +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ framework. - [Inbox listeners](./manual/inbox.md) - [Collections](./manual/collections.md) - [NodeInfo](./manual/nodeinfo.md) - [Pragmatics](./manual/pragmatics.md) - [Testing](./manual/test.md) However, this manual is not a complete guide to the Fedify framework. Loading
docs/manual/pragmatics.md +140 −0 Original line number Diff line number Diff line Loading @@ -249,3 +249,143 @@ For example, the above actor object is displayed like the following in Mastodon:  ### `manuallyApprovesFollowers`: Lock account The `manuallyApprovesFollowers` property is used to *indicate* that the actor manually approves followers. In Mastodon and Misskey, the actor is displayed as a locked account if the `manuallyApprovesFollowers` property is `true`. > [!WARNING] > The `manuallyApprovesFollowers` property only *indicates* that the actor > manually approves followers. The actual behavior of the actor is determined > by the [inbox listener](./inbox.md) for `Follow` activities. > If it automatically sends `Accept` activities right after receiving `Follow`, > the actor behaves as an unlocked account. If it sends `Accept` when the > owner explicitly clicks the *Accept* button, the actor behaves as a locked > account. ~~~~ typescript new Person({ name: "Fedify Demo", preferredUsername: "demo", summary: "This is a Fedify Demo account", manuallyApprovesFollowers: true, // Other properties... }) ~~~~ For example, the above actor object is displayed like the following in Mastodon:  ### `suspended` The `suspended` property is used to suspend an actor in Mastodon. If the `suspended` property is `true`, the profile page of the actor is displayed as suspended. ~~~~ typescript new Person({ name: "Fedify Demo", preferredUsername: "demo", summary: "This is a Fedify Demo account", suspended: true, // Other properties... }) ~~~~ For example, the above actor object is displayed like the following in Mastodon:  ### `memorial` The `memorial` property is used to memorialize an actor in Mastodon. If the `memorial` property is `true`, the profile page of the actor is displayed as memorialized. ~~~~ typescript new Person({ name: "Fedify Demo", preferredUsername: "demo", summary: "This is a Fedify Demo account", memorial: true, // Other properties... }) ~~~~ For example, the above actor object is displayed like the following in Mastodon:  ### `Federation.setFollowingDispatcher()`: Following collection The `Federation.setFollowingDispatcher()` method registers a dispatcher for the collection of actors that the actor follows. The number of the collection is displayed in the profile page of the actor. Each item in the collection is a URI of the actor that the actor follows, or an actor object itself. ~~~~ typescript federation .setFollowingDispatcher( "/users/{handle}/following", async (ctx, handle, cursor) => { // Loads the list of actors that the actor follows... return { items: [ new URL("..."), new URL("..."), // ... ] }; } ) .setCounter((ctx, handle) => 123); ~~~~ For example, the above following collection is displayed like the below in Mastodon:  > [!NOTE] > Mastodon does not display the following collection of a remote actor, > but other ActivityPub implementations may display it. ### `Federation.setFollowersDispatcher()`: Followers collection The `Federation.setFollowersDispatcher()` method registers a dispatcher for the collection of actors that follow the actor. The number of the collection is displayed in the profile page of the actor. Each item in the collection is a URI of the actor that follows the actor, or an actor object itself. ~~~~ typescript federation .setFollowersDispatcher( "/users/{handle}/followers", async (ctx, handle, cursor) => { // Loads the list of actors that follow the actor... return { items: [ new URL("..."), new URL("..."), // ... ] }; } ) .setCounter((ctx, handle) => 456); ~~~~ For example, the above followers collection is displayed like the below in Mastodon:  > [!NOTE] > Mastodon does not display the followers collection of a remote actor, > but other ActivityPub implementations may display it.