# Publishing posts to Mastodon

**URL:** https://meta.discourse.org/t/publishing-posts-to-mastodon/314609
**Category:** Administrators
**Tags:** video, activitypub
**Created:** [July 2, 2024, 11:31am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609 "2024-07-02T11:31:23Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [July 2, 2024, 11:31am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/1 "2024-07-02T11:31:23Z")

</div>

This topic covers publishing posts from Discourse to Mastodon with the Discourse ActivityPub Plugin, and follows on from [Setting up an ActivityPub Actor](https://meta.discourse.org/t/how-to-set-up-an-activitypub-actor/314578) and [Following an ActivityPub Actor](https://meta.discourse.org/t/how-to-follow-an-activitypub-actor/314580). If you’re not sure what this means, head on over to the [Discourse ActivityPub Plugin](https://meta.discourse.org/t/activitypub-plugin/266794) topic first.

https://www.loom.com/embed/26ee810f5a4741ff9c94754a416a014f?sid=bb6fa861-f847-4157-9d8c-f68a2721d1a3

### Instructions

To publish to Mastodon:

1. [Set up an actor](https://meta.discourse.org/t/how-to-set-up-an-activitypub-actor/314578) for the Category or Tag you want to publish content to Mastodon.
2. Copy the “handle” of the Actor.
3. Look up the handle on Mastodon and follow it.

### `[note]` markup

You can select part of your post to be published via ActivityPub by wrapping text in `[note][/note]`. This gives you more control over what appears on microblogging services like Mastodon. For example, if your post looks like this in the composer:

> We have some exciting news to share: [note]Everything Pets is launching a magazine![/note]

This will appear on Mastodon:

> Everything Pets is launching a magazine!

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [April 1, 2025, 1:33pm UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/2 "2025-04-01T13:33:12Z")

</div>

Hi, currently the posts by actors on Mastodon seem to miss a profile picture, which makes them look meh:

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/3/b/c3b4bb141b5c33ef4cac1c6bc88e1acf11aa4a75.png)

Is it possible to either use the avatar of the Discourse user posting, or at least the Discourse instance small logo?

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [April 3, 2025, 10:03am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/3 "2025-04-03T10:03:12Z")

</div>

> [@angus](#):
>
> You can select part of your post to be published via ActivityPub by wrapping text in `[note][/note]`.

I tried this for the first time and didn’t work as expected:

- Used on a tag.
- Edit Actor \> Post object type \> Note

Is the note syntax supposed to be visible for readers in the Discourse post?

 ![Screenshot From 2025-04-03 10-46-29](https://global.discourse-cdn.com/meta/original/4X/6/4/6/646aea328f10478557c6d5ce27af300625fc4e2a.png)

Then the full post was federated anyway, without the note syntax visible:

 ![Screenshot From 2025-04-03 10-51-07](https://global.discourse-cdn.com/meta/original/4X/b/5/a/b5a4047165a740e876325bc985ef8be1bf6a1cf1.png)

For what is worth it, first I published the Discourse post with the notes. Then, during the 5 minutes before it is federated, I removed the note tags because they were ugly and I was confused. Then I thought maybe they “disappear” after the post is federated and I added them again.

After seeing that the full post had been federated, I removed the note syntax from the Discourse post.

---

<div class="post-metadata">

### Author: ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)
#### Post date: [April 4, 2025, 6:30am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/4 "2025-04-04T06:30:34Z")

</div>

Did you forget to mention `[/note]` ?

An example would be :

```plaintext
[note]The Social Music Network is a community[/note] that encourages...

```

In this example, only the first seven words would be sent to Mastodon (and the Fediverse).

The tags do not need to be at the beginning of the post. If they are not present, then the first 500 characters will be used as an excerpt.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [April 4, 2025, 7:08am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/5 "2025-04-04T07:08:51Z")

</div>

Or the whole post if `Activity pub note excerpt maxlength = 0`

Now I’m not totally sure, but I have weak memory print where if that setting is zero then `[note][/note]` doesn’t do anything.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [April 4, 2025, 8:44am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/6 "2025-04-04T08:44:02Z")

</div>

> [@icaria36](#):
>
> Then, during the 5 minutes before it is federated, I removed the note tags because they were ugly and I was confused. Then I thought maybe they “disappear” after the post is federated and I added them again.

I’m slightly confused. Were the tags present when the post was first federated?

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [April 4, 2025, 9:42am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/7 "2025-04-04T09:42:26Z")

</div>

Thank you for your questions!

> [@hellekin](#):
>
> Did you forget to mention `[/note]` ?

No, you can see it there in the screenshot I shared. Does it make a difference if both enclosures are in different paragraphs?

> [@Jagster](#):
>
> Or the whole post if `Activity pub note excerpt maxlength = 0`

Ah, we do have this set to 0, but I didn’t understand from the description that notes won’t work if set to 0.

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/e/f/8eff2352eb3931ca96112e5933718b0b7ee147a3.png)

> [@angus](#):
>
> Were the tags present when the post was first federated?

Yes the tag we use to federate topics was there from the beginning and remained untouched. It’s the note syntax that went _forth and back_.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [April 4, 2025, 9:46am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/8 "2025-04-04T09:46:22Z")

</div>

> [@icaria36](#):
>
> notes won’t work if set to 0

I don’t know if that’s true. I just have such feeling. Try what happens?

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [April 4, 2025, 10:54am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/9 "2025-04-04T10:54:52Z")

</div>

> [@icaria36](#):
>
> It’s the note syntax that went _forth and back_.

Yes, sorry by “tags” I meant `[note][/note]`. I’m still a little unclear as to whether they were in the post at the time the post was federated. If you added them back in after federation they are not going to apply to content that is already federated.

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [April 4, 2025, 11:05am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/10 "2025-04-04T11:05:06Z")

</div>

Ok, yes, `[note][/note]` was in place when I posted the new topic on discourse and they were also in place after a few minutes when the topic was federated.

Maybe we can leave this here, and next time we federate a post I will be paying attention on every step, now that I know what tp expect and what might happen.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [April 4, 2025, 2:37pm UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/11 "2025-04-04T14:37:05Z")

</div>

> [@icaria36](#):
>
> Ok, yes, `[note][/note]` was in place when I posted the new topic on discourse and they were also in place after a few minutes when the topic was federated.

Sorry I’m still a little unclear. Apologies, maybe I’m just being a bit slow today! Did this series of events occur?

1. You created a new post in Discourse with `[note][/note]` tags included.
2. The post was scheduled to be published via ActivityPub in 5 minutes time.
3. Prior to the scheduled publication you removed the `[note][/note]` tags
4. The post was published via ActivityPub.
5. After the post was published via ActivityPub you re-added the `[note][/note]` tags to the post.

Is that what happened?

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [April 4, 2025, 2:52pm UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/12 "2025-04-04T14:52:29Z")

</div>

@angus not quite. 🙂 I’d swear it went like this, but after so much discussion I’m starting to doubt.

1. I created a new post in Discourse with `[note][/note]` tags included.
2. The post was scheduled to be published via ActivityPub in 5 minutes time.
3. Prior to the scheduled publication I removed the `[note][/note]` tags because I wasn’t expecting them to be visible in the post.
4. But then I thought “whatever, maybe they disappear after the post is federated, somehow” and I put them back.
5. The post was published via ActivityPub.

---

<div class="post-metadata">

### Author: ![rw\_grim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rw_grim/32/153189_2.png) [@rw\_grim](https://meta.discourse.org/u/rw_grim)
#### Post date: [June 26, 2025, 12:14am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/13 "2025-06-26T00:14:20Z")

</div>

I’ve added actors for multiple tags and then created a post using those tags. I was expecting both actors to post to activity pub, but only one of them did.

I’m following both on my main mastodon.social account, but I only see one post in the logs. Is this supposed to work or is only one actor supported?

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [June 26, 2025, 9:03am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/14 "2025-06-26T09:03:19Z")

</div>

If you have multiple tags actors associated with a post only the first listed tag’s actor will publish the post currently. Adding support for publishing from multiple actors of the same taxonomic type at once is a good #Contribute > Feature request (tag it #activitypub).

---

<div class="post-metadata">

### Author: ![Kayaart](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Kayaart](https://meta.discourse.org/u/Kayaart)
#### Post date: [June 26, 2025, 9:06am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/15 "2025-06-26T09:06:16Z")

</div>

Is there a way to control which categories or tags don’t get published to Mastodon? I’d like to exclude certain internal discussion topics from being posted, but still allow announcements and blog posts.Thanks in advance!

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [June 26, 2025, 9:08am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/16 "2025-06-26T09:08:28Z")

</div>

Hey @Kayaart, thanks for the question. Only the tags and categories you’ve explicitly set up as ActivityPub actors will publish content to the fediverse. If you have categories and tags for internal discussion, just leave them be (i.e. don’t set up an actor).

---

<div class="post-metadata">

### Author: ![Kayaart](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Kayaart](https://meta.discourse.org/u/Kayaart)
#### Post date: [June 26, 2025, 9:10am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/17 "2025-06-26T09:10:36Z")

</div>

Thanks a lot for the clarification that makes sense now!  
So just to confirm: if I leave some categories/tags without setting up an ActivityPub actor, nothing from them will get pushed to Mastodon, right?

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [June 27, 2025, 11:48am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/18 "2025-06-27T11:48:07Z")

</div>

Yes, that’s correct.

---

<div class="post-metadata">

### Author: ![ericomeehan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ericomeehan/32/542726_2.png) [@ericomeehan](https://meta.discourse.org/u/ericomeehan)
#### Post date: [July 3, 2025, 12:41am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/19 "2025-07-03T00:41:35Z")

</div>

On the _Federation_ tab of the user profile page, there is a configuration to add Linked Actors with an option for type Discourse or Mastodon. It says:

> Posts associated with a linked actor will be attributed to your account.

How does this work? If I add a Mastodon account here, will my Mastodon posts end up on Discourse or is it the other way around? If the former, how are tags and categories selected? If I add a Discourse account here, posts from the external server will be added to the one on which this has been configured? Again, what if the categories and tags are not consistent?

I am hosting both Discourse and Mastodon, and I also have an account on this Discourse instance. I imagine the best configuration for me would be to have a post on either Discourse instance appear on both servers and be shared once on Mastodon. How this would be configured would depend on the answer to the previous question.

Also, what about replying to posts on ActivityPub? Can I use Mastodon to reply to a post from a linked actor for categories, tags, and users?

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [July 3, 2025, 7:46am UTC](https://meta.discourse.org/t/publishing-posts-to-mastodon/314609/20 "2025-07-03T07:46:14Z")

</div>

Hey @ericomeehan,

> [@ericomeehan](#):
>
> > Posts associated with a linked actor will be attributed to your account.
> 
> How does this work? If I add a Mastodon account here, will my Mastodon posts end up on Discourse or is it the other way around?

Neither! This feature allows you to associate posts with your account if those posts are federated via the normal process, e.g. via categories or tag actors. To give an example:

1. You have a category on your Discourse called “Announcements”, which you set up with full topic ActivityPub publishing.
2. You have a user account on your Discourse, `eric_discourse`.
3. You have a user account on your Mastodon, `eric_mastodon`.
4. You follow “Announcements” with `eric_mastodon`.
5. `eric_discourse` (i.e. you) creates a new topic in “Announcements”.
6. Announcements federates the topic.
7. You respond to that topic on Mastodon with `eric_mastodon`.
8. Your response is processed by your Discourse Announcements category, appearing as a reply (post) in the topic.
9. There is nothing to associate `eric_mastodon` with `eric_discourse` so the ActivityPub plugin creates a staged user for `eric_mastodon`’s reply post, `eric_mastodon1` (the username is generated from the username of the Actor).
10. The topic now looks like this:

- First post from `eric_discourse`.
- Reply (second) post from `eric_mastodon1`.

The feature you’re referring to allows you to prove that you are `eric_mastodon1`, so that you don’t have multiple user accounts on your Discourse. Once you complete the authorization process in that tab:

- `eric_mastodon1`’s posts will be `eric_discourse`’s posts.
- `eric_mastodon1` will no longer exist.
- Future activity from `eric_mastodon` will be associated with `eric_discourse` on your Discourse instance.
