James Smith // floppy.org.uk
...a bit like having your own Thingiverse, but without this:
f3di
namespaceExtension properties for 3d content.
concreteType
compatibilityNote
...with many more to come.
Name chosen to be platform-independent.
Internal type | Actor type | concreteType |
---|---|---|
Creator | "Person" | "Creator" |
Model | "Service" | "Model" |
Collection | "Group" | "Collection" |
User | "Person" | "User" |
Model/Creator/Collection | User | Note | |
---|---|---|---|
Create | both | send | |
Update | both | send | |
Delete | both | send | |
Flag | recv | both | recv |
Follow | recv | send | |
Accept | send | recv | |
Undo | recv | send |
Most activities are changes to Actors; these won't show in microblog feeds.
So: post "Compatibility Notes", which describe the other activities.
"f3di:compatibilityNote": true
gitlab.com/experimentslabs/federails
#federails:matrix.org
bundle add federails
# config/routes.rb
mount Federails::Engine => '/'
rails generate federails:install
rails generate federails:install:migrations
# app/models/user.rb
class User < ApplicationRecord
# Include the concern here:
include Federails::ActorEntity
# Configure field names
acts_as_federails_actor username_field: :username, name_field: :name,
profile_url_method: :user_url
end
target = Federails::Actor.find_by_account "@floppy@mastodon.me.uk"
user.federails_actor.following_follows.create(target_actor: target)
Incoming requests:
class User < ApplicationModel
include Federails::ActorEntity
after_follow :throw_party
end
Federails::Activity.create!(
actor: user.federails_actor,
action: "Create",
entity: comment
)
class Comment < ApplicationRecord
include Federails::DataEntity
acts_as_federails_data handles: "Note", actor_entity_method: :commenter
def to_activitypub_object
Federails::DataTransformer::Note.to_federation(
self,
content: comment.to_html,
custom: {
"sensitive" => sensitive,
}
)
end
end
https://github.com/manyfold3d/federails-moderation
manyfold.app // @manyfold@3dp.chat
mastodon.me.uk // @Floppy@mastodon.me.uk