(chore) refactor activity links into a Propagate action
We're doing a lot of this.
https://gitlab.com/minds/engine/blob/master/Core/Feeds/Firehose/Manager.php#L106
foreach ($this->db->getRow('activity:entitylink:'.$entity->getGUID()) as $parentGuid => $ts) {
Because blogs contain links to activities when they get published. Images and videos contain multiple links to activities (one image to many activities). Yet, we have properties like NSFW, NSFW_LOCK, allow_comments ... etc that need to be propagated up and down the chain
So, when an owner or admin changes a property that applies to parents or their children, we need to create an action that applies those changes up and down the chain.
There's a question of source of truth. If there is a collision between a flag, who should win - the parent object or the object receiving the change?
Part of this card will be figuring out what flags need to be set and how they should be propagated.
Ideally, @markeharding wants them all to be activities with the attachments just inheriting the activities permissions, so we might want to take the opportunity to bring all our entities under the same banner. The activity has the permissions, the images, videos and blogs would just inherit their parent's permissions.
Looping in @markeharding @edgebal and @gthouret for their thoughts on how to roll this out.
changed milestone to %sprint: Jolly Jellyfish
mentioned in issue front#1443
assigned to @gthouret
added Type::Chore scoped label
added Squad::Blue scoped label
changed weight to 10
changed milestone to %sprint: Kilted Koala
changed milestone to %sprint: Lucky Lizard
added Status::InProgress scoped label
- Developer
@brianhatchet Have I got this right?
- Developer
I've determined that properties that would need to propagate would be:
- nsfw
- nsfw_lock
- mature flag <- instance I found was setting NSFW on blogs (Edit: also on media)
- allow_comments
- monetized
- moderator_guid
- time_moderated
Possibly also:
- comments_enabled <- this seems to be a dup of allow_comments
- access_id
Blog Specific (blog -> activity)
- title
- blurb
- thubnail_src
Edited by Guy Thouret - Developer
Editing on a media page and setting NSFW (only has 'mature' option) sets
flags: {mature: false}
on the image object.Switching back to newsfeed view, image is visible, the activity has no nsfw.
Same the other way, setting NSFW 'nudity' on the activity post from newsfeed view does not set mature flag on the image object.
So in this case some existing functionality in the Firehose Manager code could be extracted and used here.