diff --git a/plugin.rb b/plugin.rb index dc706f6..469478c 100644 --- a/plugin.rb +++ b/plugin.rb @@ -580,7 +580,7 @@ add_to_class(:user, :activity_pub_enabled) { DiscourseActivityPub.enabled } add_to_class(:user, :activity_pub_ready?) { true } - add_to_class(:user, :activity_pub_allowed?) { self.human? } + add_to_class(:user, :activity_pub_allowed?) { true } add_to_class(:user, :activity_pub_url) { full_url } add_to_class(:user, :activity_pub_icon_url) { avatar_template_url.gsub("{size}", "96") } add_to_class(:user, :activity_pub_save_access_token) do |domain, access_token| diff --git a/spec/lib/discourse_activity_pub/actor_handler_spec.rb b/spec/lib/discourse_activity_pub/actor_handler_spec.rb index 17352c1..d3b45bc 100644 --- a/spec/lib/discourse_activity_pub/actor_handler_spec.rb +++ b/spec/lib/discourse_activity_pub/actor_handler_spec.rb @@ -193,6 +193,15 @@ end end + context "with a non-human user" do + let!(:user) { Discourse.system_user } + + it "creates an actor" do + actor = described_class.update_or_create_actor(user) + expect(actor.reload.model_id).to eq(user.id) + end + end + context "with a category" do let!(:category) { Fabricate(:category) }