ActivityPub Plugin

Ok, can you link me to an example of a post with note tags where the note tags were ignored? And also the note on Mastodon or similar.

If you could indicate where in the post the note tags were applied when the post was first created (as I won’t have access to the edit view / history).

If you could also share what the maximum note character count is currently set at in the ActivityPub site settings.

Thanks!

I made a couple more tests and what I didn’t expect was that new lines or line breaks must not be used between the [note][/note] tags in order for them to be taken into account

It works better once I removed them, but The overall message doesn’t look as good though… I suppose there’s no way to include them ?

Thanks for the update. Could you share:

  1. An example of what is currently working for you.
  2. An example of what you expect to be working.
  3. Ideally a link to a live version of 1.

That’ll help me test and verify the specific issue you’re referring to. Examples are always helpful to ensure we’re on the same page.

You can see that TicketZon: concerti e mostre nel fediverso - Progetti - forum.linux.it is reported as shared but it isn’t.
The account exists on mastodon and in the log I have finally something for you:

[Discourse Activity Pub] https://forum.linux.it/ap/actor/fc1e23a5fc2214ab70c6c0aa1061a4f0 failed to schedule https://forum.linux.it/ap/activity/229b771ac7e5943928795da1122d847d for delivery: no recipients

/var/www/discourse/plugins/discourse-activity-pub/lib/discourse_activity_pub/delivery_handler.rb:93:in `log_failure'

/var/www/discourse/plugins/discourse-activity-pub/lib/discourse_activity_pub/delivery_handler.rb:35:in `can_deliver?'

/var/www/discourse/plugins/discourse-activity-pub/lib/discourse_activity_pub/delivery_handler.rb:13:in `perform'

/var/www/discourse/plugins/discourse-activity-pub/lib/discourse_activity_pub/delivery_handler.rb:27:in `perform'

/var/www/discourse/plugins/discourse-activity-pub/app/models/concerns/discourse_activity_pub/ap/model_callbacks.rb:140:in `activity_pub_deliver_activity'

/var/www/discourse/plugins/discourse-activity-pub/app/models/concerns/discourse_activity_pub/ap/model_callbacks.rb:38:in `perform_activity_pub_activity'

/var/www/discourse/plugins/discourse-activity-pub/plugin.rb:680:in `block (2 levels) in activate!'

/var/www/discourse/lib/plugin/instance.rb:545:in `block in on'

/var/www/discourse/lib/discourse_event.rb:12:in `block in trigger'

/usr/local/lib/ruby/3.2.0/set.rb:511:in `each_key'
/usr/local/lib/ruby/3.2.0/set.rb:511:in `each'
/var/www/discourse/lib/discourse_event.rb:12:in `trigger'

/var/www/discourse/lib/post_destroyer.rb:115:in `recover'

/var/www/discourse/app/controllers/topics_controller.rb:689:in `recover'

actionpack-7.0.8.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'

actionpack-7.0.8.1/lib/abstract_controller/base.rb:215:in `process_action'

actionpack-7.0.8.1/lib/action_controller/metal/rendering.rb:165:in `process_action'

actionpack-7.0.8.1/lib/abstract_controller/callbacks.rb:234:in `block in process_action'

activesupport-7.0.8.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'

/var/www/discourse/app/controllers/application_controller.rb:423:in `block in with_resolved_locale'

i18n-1.14.4/lib/i18n.rb:322:in `with_locale'

/var/www/discourse/app/controllers/application_controller.rb:423:in `with_resolved_locale'

activesupport-7.0.8.1/lib/active_support/callbacks.rb:127:in `block in run_callbacks'

activesupport-7.0.8.1/lib/active_support/callbacks.rb:138:in `run_callbacks'

actionpack-7.0.8.1/lib/abstract_controller/callbacks.rb:233:in `process_action'

actionpack-7.0.8.1/lib/action_controller/metal/rescue.rb:23:in `process_action'

actionpack-7.0.8.1/lib/action_controller/metal/instrumentation.rb:67:in `block in process_action'

activesupport-7.0.8.1/lib/active_support/notifications.rb:206:in `block in instrument'

activesupport-7.0.8.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'

activesupport-7.0.8.1/lib/active_support/notifications.rb:206:in `instrument'

actionpack-7.0.8.1/lib/action_controller/metal/instrumentation.rb:66:in `process_action'

actionpack-7.0.8.1/lib/action_controller/metal/params_wrapper.rb:259:in `process_action'

activerecord-7.0.8.1/lib/active_record/railties/controller_runtime.rb:27:in `process_action'

actionpack-7.0.8.1/lib/abstract_controller/base.rb:151:in `process'

actionview-7.0.8.1/lib/action_view/rendering.rb:39:in `process'

rack-mini-profiler-3.3.1/lib/mini_profiler/profiling_methods.rb:89:in `block in profile_method'

actionpack-7.0.8.1/lib/action_controller/metal.rb:188:in `dispatch'

actionpack-7.0.8.1/lib/action_controller/metal.rb:251:in `dispatch'

actionpack-7.0.8.1/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'

actionpack-7.0.8.1/lib/action_dispatch/routing/route_set.rb:32:in `serve'

actionpack-7.0.8.1/lib/action_dispatch/journey/router.rb:50:in `block in serve'

actionpack-7.0.8.1/lib/action_dispatch/journey/router.rb:32:in `each'

actionpack-7.0.8.1/lib/action_dispatch/journey/router.rb:32:in `serve'

actionpack-7.0.8.1/lib/action_dispatch/routing/route_set.rb:852:in `call'

/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:64:in `call'

rack-2.2.8.1/lib/rack/tempfile_reaper.rb:15:in `call'

rack-2.2.8.1/lib/rack/conditional_get.rb:40:in `call'

rack-2.2.8.1/lib/rack/head.rb:12:in `call'

actionpack-7.0.8.1/lib/action_dispatch/http/permissions_policy.rb:38:in `call'

/var/www/discourse/lib/content_security_policy/middleware.rb:12:in `call'

/var/www/discourse/lib/middleware/anonymous_cache.rb:393:in `call'

/var/www/discourse/lib/middleware/csp_script_nonce_injector.rb:12:in `call'

/var/www/discourse/config/initializers/008-rack-cors.rb:14:in `call'

rack-2.2.8.1/lib/rack/session/abstract/id.rb:266:in `context'

rack-2.2.8.1/lib/rack/session/abstract/id.rb:260:in `call'

actionpack-7.0.8.1/lib/action_dispatch/middleware/cookies.rb:704:in `call'

actionpack-7.0.8.1/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'

activesupport-7.0.8.1/lib/active_support/callbacks.rb:99:in `run_callbacks'

actionpack-7.0.8.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'

actionpack-7.0.8.1/lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'

actionpack-7.0.8.1/lib/action_dispatch/middleware/show_exceptions.rb:29:in `call'

logster-2.19.1/lib/logster/middleware/reporter.rb:40:in `call'

railties-7.0.8.1/lib/rails/rack/logger.rb:40:in `call_app'

railties-7.0.8.1/lib/rails/rack/logger.rb:27:in `call'

/var/www/discourse/config/initializers/100-quiet_logger.rb:20:in `call'

/var/www/discourse/config/initializers/100-silence_logger.rb:29:in `call'

actionpack-7.0.8.1/lib/action_dispatch/middleware/remote_ip.rb:93:in `call'

actionpack-7.0.8.1/lib/action_dispatch/middleware/request_id.rb:26:in `call'

/var/www/discourse/lib/middleware/enforce_hostname.rb:24:in `call'

rack-2.2.8.1/lib/rack/method_override.rb:24:in `call'

actionpack-7.0.8.1/lib/action_dispatch/middleware/executor.rb:14:in `call'

rack-2.2.8.1/lib/rack/sendfile.rb:110:in `call'

actionpack-7.0.8.1/lib/action_dispatch/middleware/host_authorization.rb:131:in `call'

rack-mini-profiler-3.3.1/lib/mini_profiler.rb:191:in `call'

message_bus-4.3.8/lib/message_bus/rack/middleware.rb:60:in `call'

/var/www/discourse/lib/middleware/request_tracker.rb:236:in `call'

railties-7.0.8.1/lib/rails/engine.rb:530:in `call'

railties-7.0.8.1/lib/rails/railtie.rb:226:in `public_send'

railties-7.0.8.1/lib/rails/railtie.rb:226:in `method_missing'

rack-2.2.8.1/lib/rack/urlmap.rb:74:in `block in call'

rack-2.2.8.1/lib/rack/urlmap.rb:58:in `each'

rack-2.2.8.1/lib/rack/urlmap.rb:58:in `call'

unicorn-6.1.0/lib/unicorn/http_server.rb:634:in `process_client'
unicorn-6.1.0/lib/unicorn/http_server.rb:739:in `worker_loop'
unicorn-6.1.0/lib/unicorn/http_server.rb:547:in `spawn_missing_workers'
unicorn-6.1.0/lib/unicorn/http_server.rb:143:in `start'
unicorn-6.1.0/bin/unicorn:128:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/bin/unicorn:25:in `load'
/var/www/discourse/vendor/bundle/ruby/3.2.0/bin/unicorn:25:in `<main>'

I’ve added block support to [note][/note] tags in this PR (it needs to be reviewed and merged)

This will be standard Discourse markdown block support following the approach described here

So this

[note]
First line

Second line
[/note]

Third line

Will produce a Note content of

"First line\nSecond line"

Whereas this

[note]First line

Second line[/note]

Third line

Will produce a Note content of

First line\nSecond line\nThird line

(i.e. the [note][/note] tags are ignored and removed)

This means there is no-one following the Category actor, so it’s got no-one to deliver to.

2 Likes

Uhm so for the same reason there should be the green marker in the post that says that was published or not?
Now I am following all the various categories on mastodon and I will do a test.

I can confirm that works it is required that the account is followed.

1 Like

Perhaps what you’re expecting is that without any followers the posts of the Category Actor would still show as toots on a representation of the Actor on Mastodon? That would require Mastodon to implement a version of outbox importing, i.e.

Note that this plugin will be supporting outbox importing soon (the functionality is already built and will be exposed to admins in upcoming updates). In other words, you will be able to backfill the content from a remote actor.

3 Likes

It works for me now, using https://koji.fedoraproject.org/koji/buildinfo?buildID=2426311.

1 Like

I’s getting the whole note not listed error as well. What am I doing wrong? Did I need to put an @ symbol in the section shown below?

I’m not sure what I am doing wrong here.

Sorry, I don’t quite follow. Could you explain a bit more?

Nothing is being published to ActivityPub.

Could you explain a bit more about what you expect to happen? For example

  1. I make a post on my forum.
  2. I expect to see…

Well I figured that when I make a post in the categories I have this enabled in to be published on ActivityPub and they aren’t. They aren’t being published at all.

What do you mean by “ActivityPub”? Where are you expecting to see? I’m sorry for the questions. I want to get to the bottom of the issue from a usability perspective, so I’m trying to get you to explain it in your own words :slight_smile:

You may have the same issue which others have reported, which is that there are no followers of your category. The post isn’t going to appear anywhere if no-one is following it because there’s no-where to send it to. Or in other words

ActivityPub publishing relies on follow relationships to work. Your category actor will still show up on Mastodon (or other services) without any followers, but keep in mind that what Mastodon shows you there is up to Mastodon.

If you could walk me through your expectations a bit more it would really help! Maybe if you could give an example of another ActivityPub service where you feel this is working? Thanks.

The little eye symbol has a line through it and when I click on it it says this not been published.

Most likely because there is no-one following your category. If you turn on the site setting activity_pub_verbose_logging and look in your logs you will probably see a message that looks like this

I’m definitely going to put a “reason” in that modal as this has come up a few times now! Follow your category on Mastodon, and then create a new topic.

**edit or perhaps I will just change it to “published” in that scenario, as it does in fact add the activity to the outbox. It just doesn’t send it anywhere (as it has nowhere to send it to). So it technically is “published” (i.e. it’s in the outbox).

3 Likes

It’s a good moment to implement this protocol or I should wait a few? I wish open my community to fediverse and archive whole contents for everyone and forever but I had read about Mastodon and Lemmy and I suppose that not the while new laws are rolling around.

I think that discussion of the legal circumstances in any particular jurisdiction are probably outside the scope of this topic. :slight_smile:

1 Like

A few updates to share here! All ActivityPub configuration will soon move to a unified administration panel:

Following tags will soon become possible:

Along with NodeBB, Flarum, Lemmy and a number of other ActivityPub platforms we’ve created a W3C working group to better align Forum and Link sharing software in the Fediverse. We’re already coordinating that work via ActivityPub. For example our next meeting is being organised in a single topic across both Discourse and NodeBB

6 Likes