Add_to_streams method

I want to develop the add_to_streams method as following:

== Current behaviour of Diaspora ==

When a status message is shared, it is added to the streams of:

i) the owner,
ii) all contacts belonging to the aspects the owner selected, and
iii) mentioned users

=== The functionality you want to add ===
I want the status message to be added to i), ii) and iii), and
additionally:

iv) the contacts in aspects specified beforehand by mentioned users.

I do not want to remove the status message from any stream just
adding the ones in iv).

========= Here is my code =======

code of the developed version of add_to_streams

I would greatly appreciate it if you kindly give me some suggestions

Best,
Hanaa

It looks like your code is based on a very old StatusMessagesController (it was heavily refactored in 0.5.3.0, so this is older than that). So you should start your work on the latest code from the develop branch and not some old versions.

But about your question: That doesn’t work, because aspects are not federated, so only the mentioned person knows them, the author of the post doesn’t know the aspects/contacts of the mentioned people.

There is no way to connect the aspects/contacts of the mentioned users to a status message where the mentioned users have been mentioned ?!

It can work when both are on the same server, but it doesn’t solve the issue that the author can’t see/control with whom the post is shared, and diaspora is about having control who can see what, and not by automatically share a post with an unknown set of people of another person, as side-effect by mentioning somebody, so I don’t see why this should be useful.

1 Like

Thank you for taking time out to answer my questions…

Okay let’s back to your first replay. what you meant by the aspects are not federated ?! Yes, author of the post only knows about his/her aspects/contacts.

In your second reply. (the author can’t see/control with whom the post is shared) what you mean by that ? in daispora the author can control with whom the post is shared when he or she creats post and that done by selecting some or all aspects from his or her aspects list, is not ?!

What I’m trying to do it gives the mentioned users some type of control over the post where they have been mentioned. So, I want to share that post with aspects specified beforehand by mentioned users.

Thanks again, I look forward to hearing back from you.

Yes, exactly, the author has the control, nobody else. Other users can’t reshare a private post.

That would even be worse than manual reshares of private posts, so somebody would automatically reshare private posts to some other users when the author of the posts adds a mention, and the author doesn’t even know about it, and the mentioned user would forward the post to other users before even reading the post. The author has the control, not the mentioned user!

Sure, you can do the same by copy/paste or screenshot, and we can’t protect from that. But it would be bad to do this automatically in the software!

Okay I see your point, but how you think I can modify the add_to_streams method to add the status message in streams of the aspects that are specified beforehand by mentioned users. Any idea to do that ?

I still don’t recommend you to do that, but I obviously can’t stop you to do this. However, I have no idea if it works that way, because it was never designed or tested to handle aspects of other people than the author, so I don’t know if that works or not.