GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Terence Eden’s Blog (blog@shkspr.mobi)'s status on Monday, 11-Nov-2024 16:30:10 JST Terence Eden’s Blog Terence Eden’s Blog
    • Colours Bot
    Introducing ActivityBot - the simplest way to build Mastodon Bots

    As you may have read, BotsIn.Space is closing down, I have lots of automated bot accounts living on the Fediverse - and I want them to continue posting. Installing and maintaining an entire Mastodon instance sounds like hard work. Paying people to host my stuff feels like putting my fate in someone else's hands.

    Say… didn't I write my own ActivityPub server? Why, yes! Yes I did!

    I took the code and stripped it down to the bare essentials. All you need to do is upload two files0 - index.php and .htaccess - fill in your details, and you're done.

    Get the ActivityBot source code on GitLab.

    There's no database, no containers, no caching. It is as simple as I could make it

    This bot can do the following:

    • 🔍 Be discovered on the Fediverse
    • 👉 Be followed by other accounts
    • 🚫 Be unfollowed by accounts
    • 📩 Send messages to the Fediverse
    • 🖼️ Attach an image & alt text to a message
    • 🕸️ Autolink URls, hashtags, and @ mentions
    • 🚚 Move followers from an old account
    • 🔏 Verify cryptographic signatures
    • 🪵 Log sent messages and error.

    That's it! Here's what it doesn't do:

    • ❌ Receive messages (other than follows and unfollows)
    • ❌ Send private messages
    • ❌ Thread replies
    • ❌ Delete or update a post
    • ❌ Create Polls
    • ❌ Attach multiple images
    • ❌ Set focus point for images
    • ❌ Set sensitivity for images / blur
    • ❌ Set "Content Warning"
    • ❌ Accurate support for converting user's text to HTML
    • ❌ Cannot be discovered by Lemmy instances

    Grab a subdomain (don't buy a whole new domain name!) and stick this code on it. You'll have an ActivityPub bot running in minutes.

    You can follow one of my bots @colours@colours.bots.edent.tel

    Feedback very much welcome.

    1. You can also upload a .env file for your configuration if you want. ↩︎

    #ActivityPub #bot #fediverse

    In conversation about 6 months ago from shkspr.mobi permalink
    • Kari'boka likes this.
    • Embed this notice
      Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Wednesday, 13-Nov-2024 11:34:19 JST Haelwenn /элвэн/ :triskell: Haelwenn /элвэн/ :triskell:
      in reply to

      @blog From a quick read of the code:

      Around https://gitlab.com/edent/activity-bot/-/blob/9fed3dff8b3f02c836a1e48ae02b40c3d74a057d/index.php#L815 Note construction seems to be missing the cc field, which is present in the Create activity, they need to match.

      Around https://gitlab.com/edent/activity-bot/-/blob/9fed3dff8b3f02c836a1e48ae02b40c3d74a057d/index.php#L1039 means the mention part of the bot is Mastodon-specific as other servers don't use https://{$domain}/@{$user} and also will likely not work properly as it doesn't seems to add their ActivityPub IDs to to or cc fields.
      Might be a better idea to have the bot client mention via raw ActivityPub IDs instead of @username@domain since that requires keeping a user database.

      In conversation about 6 months ago permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: gitlab.com
        index.php · 9fed3dff8b3f02c836a1e48ae02b40c3d74a057d · Terence Eden / ActivityBot · GitLab
        A single PHP file which acts as a basic ActivityPub bot server.
      2. No result found on File_thumbnail lookup.
        index.php · 9fed3dff8b3f02c836a1e48ae02b40c3d74a057d · Terence Eden / ActivityBot · GitLab
        A single PHP file which acts as a basic ActivityPub bot server.
    • Embed this notice
      Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Wednesday, 13-Nov-2024 11:43:16 JST Haelwenn /элвэн/ :triskell: Haelwenn /элвэн/ :triskell:
      in reply to
      • Haelwenn /элвэн/ :triskell:

      @blog Also for objects and activities to be valid when fetched they need to have the content-type: application/activity+json header.

      Currently https://colours.bots.edent.tel/posts/6733f30a-1e98-2f5d-95a4-814d541f3970.json returns application/json.

      In conversation about 6 months ago permalink

      Attachments


    • Embed this notice
      Terence Eden (edent@mastodon.social)'s status on Thursday, 14-Nov-2024 09:33:03 JST Terence Eden Terence Eden
      in reply to
      • Haelwenn /элвэн/ :triskell:

      @lanodan thanks! I appreciate the feedback. I'll work on making those changes.

      In conversation about 6 months ago permalink
      Haelwenn /элвэн/ :triskell: likes this.

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.