• 0 Posts
  • 20 Comments
Joined 8 months ago
cake
Cake day: March 24th, 2024

help-circle


  • I’m not familiar with n8n but it’s fairly straightforward on the API side.

    You’ll need a session token, also known as JWT, which you can get from logging in.

    You typically don’t want to do a login for every post, so you’ll want to store that as a persistent value.
    For authentication, you can pass the header authorization: Bearer {jwt}, with {jwt} being the session token.

    https://join-lemmy.org/api/classes/LemmyHttp.html contains the API documentation.

    You’ll need to figure out the id of the community that you want to post to.

    If you need to look it up, you can use getCommunity to fetch its details. Afterwards you can use createPost to submit it.

    The form links for the methods explain the request body json values that should be provided.




  • delegating authentication to another service.

    one of the more commonly known options would be sign in with google, but this is also quite useful for providers hosting multiple services. a provider could host a service that handles authentication and then you only have to login once and will automatically get logged in for their lemmy, xmpp, wiki and other services they might be providing.




  • it seems to have become more frequent recently.

    i’ve been experiencing the same on firefox and i’ve also heard other people report the same on firefox, which happened around the time of the firefox 129 release. i didn’t see anything noteworthy in the release notes though that’d explain this. it seems like it might be related to enhanced tracking protection and cookie isolation.




  • simply put: no

    most fediverse software has its own API specific to how that application works. in some cases different fediverse software may be sharing a common API, which is typically a result of either a reimplementation (e.g. the Sublinks project is working on a reimplementation of the Lemmy API) or the result of a fork, where the previous API has been inherited and is typically built on top of.

    It should also be noted that while Lemmy and Mastodon both use ActivityPub federation for interoperation, they have significantly different internal structures for how data is stored and represented to clients. I don’t know if mastodon supports vote federation with Lemmy at this point, but if it doesn’t do that currently, then using an alternative frontend won’t help you. It would likely be possible to build a Mastodon client that has a better thread view though, but it’d still have to be something built for the Mastodon API specifically.


  • What do you mean by “finish federation”?

    Generally, individual activities (subscriptions, posts, comments, votes, etc) are federated within less than a minute of them being created. Your instance learns about other instances e.g. from votes seen on other instances. You’ll need to start subscribing to some communities on other instances to get started. You may want to check out Lemmy Explorer or Lemmy Community Browser to find communities and Lemmy Federate to automatically subscribe to other communities and get content sent to you.

    The allowed instances list means that the instance will only connect to those instances and will refuse to send activities to any other instance.








  • records can’t be duplicated in the database, the activity id is a unique key:

    lemmy=# \d sent_activity
                                                   Table "public.sent_activity"
               Column            |           Type           | Collation | Nullable |                  Default
    -----------------------------+--------------------------+-----------+----------+-------------------------------------------
     id                          | bigint                   |           | not null | nextval('sent_activity_id_seq'::regclass)
     ap_id                       | text                     |           | not null |
     data                        | json                     |           | not null |
     sensitive                   | boolean                  |           | not null |
     published                   | timestamp with time zone |           | not null | now()
     send_inboxes                | text[]                   |           | not null |
     send_community_followers_of | integer                  |           |          |
     send_all_instances          | boolean                  |           | not null |
     actor_type                  | actor_type_enum          |           | not null |
     actor_apub_id               | text                     |           |          |
    Indexes:
        "sent_activity_pkey" PRIMARY KEY, btree (id)
        "sent_activity_ap_id_key" UNIQUE CONSTRAINT, btree (ap_id)