Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding to diffrent feeds #75

Open
maidul98 opened this issue Dec 30, 2018 · 3 comments
Open

adding to diffrent feeds #75

maidul98 opened this issue Dec 30, 2018 · 3 comments

Comments

@maidul98
Copy link

I know that when you create a new post, it adds to the user feed by default. When the post is created, I also want to add it to certin categories. For instance, if the post they are creating is under under catifgory X, I want to add to the feed of category X. This way peopel can follows categories. How would I do this? Thank you.

@ow
Copy link

ow commented Jan 9, 2019

Ha, I'm trying to figure out the same thing and it's really unclear. I can only see information about doing that manually.

@tbarbugli
Copy link
Member

You can do this with the activity to targeting field. If you use the activity trait you can get that done by implementing the activityNotify method and return the list of feeds the activity should be copied.

public function activityNotify()
    {
        if (...) {
            return ['category:1', 'category:2', ...];
        }
    }

@ow
Copy link

ow commented Jan 10, 2019

@tbarbugli thanks - I had figured this out after writing the comment. What's still remains unclear to me is whether this should be a second activity add being fired, or if it should be on the initial one where it's added to the user timeline? I'm firing two activity add events, setting the foreign keys on both, but seeing duplicates when the user subscribes to follow both a user and category.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants