Libove Blog

Personal Blog about anything - mostly programming, cooking and random thoughts

Tag: activitypub

#

Implementing scheduled publishing with #ActivityPub requires some effort. Until now my blog only had draft/published as states of entries. The AP service would just send out the requires requests immediately. With the possibility of setting the publishing date into the future this is no longer possible. I have to somehow trigger these after the publishing date.

Pull systems are so much easier than push systems.



#

What is considered best practice when shutting down an #ActivityPub service? The services itself is not used by anyone, but still received a constant stream of activities for deleted users.



#

#TIL Set your Content-Type header correctly when sending #ActivityPub messages. #Lemmy will 404 on any inbox if the header is not correct (actually just if it doesn't start with application/


owl-blogs 0.3.2

I've worked on some smaller features and improvements for owl-blogs.

Main Features:

  • Lists and Tags now have RSS Feeds.
  • Nicer 404 Pages

For development I took the time to setup the "end-to-end" tests using go test instead of the previous pytest setup. This vastly simplifies testing and its much quicker.

To test #ActivityPub functionality I use a small mock server, which content can be controlled during testing.

#owlblogs


#

Some crawlers try to use the (non-existing) #Mastodon API of my blog, since my blog supports #ActivityPub.

Most don't send a User-Agent or use the generic user-agent of the library they use.

"/api/nodeinfo"
"/api/v1/config"
"/api/v1/directory?limit=1"
"/api/v1/instance"
"/api/v1/instance/activity"
"/api/v1/instance/domain_blocks"
"/api/v1/instance/peers"
"/api/v1/streaming/public"
"/api/v1/timelines/public?limit=100"
"/api/v1/timelines/public?limit=40"
"/api/v3/federated_instances"


#

Next Milestone for #ActivityPub support in owl-blogs: being able to play fedi-games :D


#

When using go-ap/jsonld, to extend the context by a term use:

jsonld.WithContext(
	jsonld.Context{
		{IRI: jsonld.IRI(vocab.ActivityBaseURI)},
		{Term: jsonld.Term("Hashtag"), IRI: jsonld.IRI("https://www.w3.org/ns/activitystreams#Hashtag")},
	},
)

Instead of:

var ApEncoder = jsonld.WithContext(
	jsonld.IRI(vocab.ActivityBaseURI),
	jsonld.Context{
		{Term: jsonld.Term("Hashtag"), IRI: jsonld.IRI("https://www.w3.org/ns/activitystreams#Hashtag")},
	},
)

The latter ignores the terms.

#golang #dev #activitypub #fediverse