Commit 9a35a0d8 authored by Jason Robinson's avatar Jason Robinson Committed by Dennis Schubert

Add participation to on receiving reshare

When author of the root post receives a reshare to it, no participation is added to the root author on the reshare. This causes any comments on the reshare on remote pods not to be sent to the author. Adding a participation should subscribe to the reshare and thus bring added comments back to the author.

closes #6481
parent 66925918
......@@ -8,6 +8,7 @@
* Fix notifications for interactions by non-contacts [#6498](
* Fix issue where the publisher was broken on profile pages [#6503](
* Prevent participations being created for invalid interactions [#6552](
* Improve federation for reshare related interactions [#6481](
## Features
......@@ -56,6 +56,7 @@ class Reshare < Post
def receive(recipient, sender)
local_reshare = Reshare.where(:guid => self.guid).first
if local_reshare && local_reshare.root.author_id ==
recipient.participate! self
return unless recipient.has_contact_for?(sender)
super(recipient, sender)
......@@ -50,7 +50,8 @@ describe Reshare, :type => :model do
expect(@root.resharers).to include(
it 'does not error if the root author has a contact for the resharer' do
it "does not error if the root author has a contact for the resharer" do
bob.share_with, bob.aspects.first
expect {
Timeout.timeout(5) do
......@@ -58,6 +59,12 @@ describe Reshare, :type => :model do
}.not_to raise_error
it "participates root author in the reshare" do
participations = Participation.where(target_id:, author_id: @root.author_id)
expect(participations.count).to eq(1)
describe '#nsfw' do
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment