diff --git a/static/images/integrations/bot_avatars/mastodon.png b/static/images/integrations/bot_avatars/mastodon.png new file mode 100644 index 0000000000..a875d7783c Binary files /dev/null and b/static/images/integrations/bot_avatars/mastodon.png differ diff --git a/static/images/integrations/logos/mastodon.svg b/static/images/integrations/logos/mastodon.svg new file mode 100644 index 0000000000..11d0c30c56 Binary files /dev/null and b/static/images/integrations/logos/mastodon.svg differ diff --git a/static/images/integrations/mastodon/001.png b/static/images/integrations/mastodon/001.png new file mode 100644 index 0000000000..d71ee50efb Binary files /dev/null and b/static/images/integrations/mastodon/001.png differ diff --git a/templates/zerver/integrations/mastodon.md b/templates/zerver/integrations/mastodon.md new file mode 100644 index 0000000000..e6ca4be5c3 --- /dev/null +++ b/templates/zerver/integrations/mastodon.md @@ -0,0 +1,35 @@ +Fetch public posts (sometimes called “toots”) of individual accounts or +federated hashtags from Mastodon in Zulip! While Zulip doesn't integrate +directly with ActivityPub or the overall Fediverse, some ActivityPub servers, +like [Mastodon](https://joinmastodon.org/), publish RSS feeds that can +be followed in Zulip using the [Zapier][1] or [RSS][2] integrations. + +!!! warn "" + + Due to the complexities of Mastodon federation, + following a hashtag on one homeserver does not guarantee that all posts in the + entire Fediverse will be included in the feed. Rather, all public posts + that have federated to the instance in question will be included. This + means you may get different results for the same hashtag, depending on + which homeserver you choose to subscribe through. + +1. Find the RSS feed for the account or hashtag you'd like to follow. Usually, + this means appending `.rss` to its Mastodon URL. + + !!! tip "" + + For example, to follow Zulip's Mastodon account at + `https://fosstodon.org/@zulip`, you would use + `https://fosstodon.org/@zulip.rss`. To follow the **#zulip** hashtag at + `https://fosstodon.org/tags/zulip`, you would use + `https://fosstodon.org/tags/zulip.rss`. + +1. Follow the [Zapier][1] integration guide (recommended) or the [plain RSS][2] + integration guide using this feed URL. + +{!congrats.md!} + +![Mastodon posts in Zulip via Zapier](/static/images/integrations/mastodon/001.png) + +[1]: ./zapier +[2]: ./rss diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py index 3b88a9adc6..23579e85c5 100644 --- a/zerver/lib/integrations.py +++ b/zerver/lib/integrations.py @@ -562,6 +562,13 @@ INTEGRATIONS: Dict[str, Integration] = { display_name="Jitsi Meet", doc="zerver/integrations/jitsi.md", ), + "mastodon": Integration( + "mastodon", + "mastodon", + ["communication"], + display_name="Mastodon", + doc="zerver/integrations/mastodon.md", + ), "matrix": Integration( "matrix", "matrix", ["communication"], doc="zerver/integrations/matrix.md" ),