juho-jaakkola/Elgg — comment on commit 6e2a275b95f80f587a8943cb3ee9a5953e272630
File:  line 0
By juho-jaakkola:

I added a new relation between sender's copy of the reply and the message that is in the sent box of the replying user. Therefore the other message is owned by the replying user. And since the access_id of the messages is set to private, the original sender can't access the attached message without elgg_set_ignore_access().

I wasn't sure if this is a good way to do it but I could't come up with any other solution within the time I was able to spend for this.

I suppose we could trace back three messages (the reply in inbox -> replier's sent box -> replier's inbox -> sender's sent box) and attach that message to the reply. Then the attached message would be owned by the original sender. But wouldn't we still have to use ignore access to trace the way back to that message?

I hope I explained this well enough. The connections between the messages are a bit confusing.