int-activitypub

command module
v0.0.0-...-1052f9e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

README

About

ActivityPub source implementation for Awakari. Actually, just another Activitypub server that follows specified publishers.

Awakari is a service consuming public updates from various sources and filters these for a user. The purpose is only to notify user in real time and provide a link to the source (e.g. post). If you don't want Awakari to follow you, just find it in a list of your followers and block.

TODO sources blacklist

Conversion Schema

Specific (non "as is") attribute conversions:

Source Activity Attribute Destination CloudEvent Attribute Notes
actor.id source
actor.name subject e.g. "John Doe"
published time
content <text data>
summary <text data> Prepends the existing text data (if any) with a line separator
type action e.g. "Create"
object.id objecturl only if object is link
object.type object e.g. "Note"
object.attachment.id attachmenturl only if attachment is link
object.attachment.url attachmenturl only if attachment is object
object.attachment.mediaType attachmenttype only if attachment is object
object.content <text data> Prepends the existing text data (if any) with a line separator
object.inReplyTo inreplyto
object.location latitude
object.location longitude
object.startTime starts
object.summary <text data> Prepends the existing text data (if any) with a line separator
object.image imageurl

Notes:

  • All other attributes (not mentioned in the table above) are been converted as is, e.g. "duration" -> "duration"

  • Activity attribute may be an "object" without an activity type (verb, e.g. "Create"). Then it's also been converted as "object" in addition to the activity fields.

Compatibility

Software Following Delivery
Mastodon ✅ OK ✅ OK
Lemmy ❌ status: 400 ❌ N/A
Kbin ✅ OK ?
Pixelfed ✅ OK ?
PeerTube ❌ status: 400, "incorrect activity" ❌ N/A
Pleroma ❌ status 500, "Internal server error" ❌ N/A
Misskey ✅ OK ?
BookWyrm ✅ OK ?
Friendica ✅ OK ✅ OK
Hubzilla ✅ OK ✅ OK
Funkwhale ❌ status 500 ❌ N/A

Other

Public Key

openssl genrsa 2048 | openssl pkcs8 -topk8 -nocrypt -out private.pem
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
kubectl create secret generic int-activitypub-keys \
  --from-file=public=public.pem \
  --from-file=private=private.pem
kubectl create secret generic int-activitypub-search-client-mastodon \
  --from-literal=key=key1 \
  --from-literal=secret=secret1 \
  --from-literal=token=token1

Manual Testing

Example request:

grpcurl \
  -plaintext \
  -proto api/grpc/service.proto \
  -d '{ "addr": "Mastodon@mastodon.social" }' \
  localhost:50051 \
  awakari.int.activitypub.Service/Create

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL