FAQ
Can I follow users
You can by creating a new Follow activity with following properties:
- type "Follow"
- collection: "outbox"
- object: url of the user to follow
- actor: your actor url
- config id: follow
- status: unpublished
Leave the 'to' textarea empty, the object will be used to send to the users' inbox. These properties are automatically filled populated when using the "Follow user" action, which also hides all form elements, except the user url textfield.
After saving, a queue item will be generated if all parameters are ok. If not, use the "Add to queue" operation for this activity.
The "Accept" request sent back by the user will set the status of the follow activity to 1. To unfollow the user, use the 'Undo' operation on this activity.
What happens if a local post is deleted
When you delete a post (node, comment) which has been sent to (remote) users, a "Delete" activity will be created in the outbox collection to notify the other platforms to remove this post.
What is the 'Move' activity in my Inbox collection
Mastodon has a feature where accounts can be moved to another instance. When this activity is stored in the Inbox, two things might happen:
- A new outbox 'Follow' request will be created in case you follow this user.
- The original inbox Follow and Accept requests from/to this user are deleted.
Other activities from the original instance will not be removed.
Can I send DM's
You can: set the post privacy (visibility) to Private. Also, when configuring a content type, set the default status to unpublished!
This is alpha, so be careful, and simply don't send important information via direct messages!
What does 'Mute' do in the Reader?
This will set the 'Follow' activity to unpublished so that messages of this user will not appear anymore in the home timeline. They will show up in the local timeline. To unmute a user, go to 'Sources', then 'Fediverse' or find a post from the user in the Local timeline.
Can I use this together with the IndieWeb module
You can use the Microsub module (bundled in the IndieWeb module) to follow users and then use your favorite reader client to read content and interact via Micropub.
If you are using a Micropub client, using one or more syndication targets can help you to create an outbox request. Create a syndication target which is not a URL. These won't be added then to the webmention queue. Once done, you need to implement two hooks with custom code:
/**
* Implements hook_indieweb_micropub_node_pre_create_alter().
*/
function hook_indieweb_micropub_node_pre_create_alter(&$values, &$payload) {
// Reset mp-syndicate-to in case you configure to automatically send
// a webmention to the link found in in-reply-to.
if (!empty($payload['mp-syndicate-to'])) {
if (in_array('activitypub_reply', $payload['mp-syndicate-to'])) {
$payload['mp-syndicate-to'] = ['activitypub_reply'];
}
}
}
/**
* Implements hook_indieweb_micropub_node_saved().
*/
function hook_indieweb_micropub_node_saved(NodeInterface $node, $values, $payload, $payload_original) {
if (!empty($payload_original['mp-syndicate-to'])) {
foreach ($payload_original['mp-syndicate-to'] as $target) {
switch ($target) {
// Value of syndication target.
case 'activitypub_reply':
if ($node->bundle() == 'reply') {
$values = [
'status' => TRUE,
'collection' => 'outbox',
// id of reply config entity
'config_id' => 'reply',
'uid' => $node->getOwnerId(),
// Replace {actor_name} with the activitypub name.
'actor' => 'https://yourdomain.com/user/1/activitypub/{actor_name}',
'entity_type_id' => 'node',
'entity_id' => $node->id(),
'processed' => FALSE,
];
// This is a reply, so we have the in-reply-to microformat value.
// Other values of this can be 'followers' or the canonical link
// of a user.
$values['object'] = $payload_original['in-reply-to'][0];
/** @var \Drupal\activitypub\Entity\ActivityPubActivityInterface $activity */
$activity = \Drupal::entityTypeManager()->getStorage('activitypub_activity')->create($values);
$activity->save();
\Drupal::service('activitypub.outbox.client')->createQueueItem($activity);
Cache::invalidateTags(['user:' . $node->getOwnerId()]);
}
break;
}
}
}
}Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion