Is it possible for a user to query the state of a given lemmy server’s federation state?
According to the lemmy documentation the server can be configured with one of three different states of federation:
- Open
- Blocklist
- Allowlist
Unfortunately, I joined a lemmy instance that was set to “allowlist” and therefore I couldn’t interact with most of the lemmy fediverse :(
I’m wondering if it’s possible for non-users to query a server to see what federation state it’s set-to, so that users can be aware of how limited their content will be before they signup.
Lemmy Map does something in that direction - but in the form of a graph instead of a table.
thanks! Unfortunately that site is basically unuseable for me, but perhaps if we dig into their code, we’ll find how they figure out the federation state…
I believe I’ve read somewhere that @wintermute@feddit.de was intending to publish it.
The sourcecode is here afaict https://codeberg.org/wintermute/lemmymap
It says they use lemmy-stats-crawler, but I can’t get it to run on Debian 11. And I can’t open issues on that repo.
I would have to take a look, it’s probably outdated, there is also https://github.com/LemmyNet/lemmy-stats-crawler
You can query an instance’s API at https://lemmy.ml/api/v3/site
Thanks! I can’t find any field that specifies
open
orblocklist
orallowlist
but I do see arrays forlinked
andallowed
andblocked
. My best-guess is:- if
allowed
is not null, then the server’s federation is inallowlist
state - if
blocked
is not null, then the server’s federation is inblocklist
state
…but I could be totally wrong
And I don’t know how to determine if the server’s federation state is
open
.It would be good if we had three example servers – one in each state (
open
,blocklist
, andallowlist
) so that I could compare the API’s output for each.Edit: /u/Nutomic clarified this on GitHub:
Regarding “federation state”: You can have a blocklist, then Lemmy will federate with every instance except blocked ones. Or have an allowlist, then it will only federate with the allowed ones. If neither is set then it also federate with everything. Using allowlist and blocklist together doesnt make much sense, then it would only federate with allowed instances which are not in the blocklist.
if allowed is not null, then the server’s federation is in allowlist state
this.
otherwise it’s open federation with or without blocklist
wait but there’s three states. If it’s not
allowlist
then it’s eitheropen
orblocklist
– according to the documentation.Are you suggesting that if both are null then the federation state is set to
open
?according to the documentation
open
andblocklist
have open federation.
- if