Closed JDGrimes closed 8 years ago
This is a nice feature idea, but it isn't something that we need to pursue in the initial UI. It can probably be introduced across reactors later, either in the reactor bootstrap, as noted above, or in the main reaction firing code. Barring that, it could be supported on a per-reactor basis without much trouble.
I think this feature would be essentially baked into the possessions API (#119), at least for cases like comments on a post. However, it is still useful within the events API, like when a user leaves a message in a chat room and there are several people present, or things like that.
Closing in favor of https://github.com/WordPoints/wordpoints/issues/466.
I think that it would be useful to select a group of entities within an entity array as the target for a reaction. For example, all of the authors of the comments on a post (unique or per-comment???), or all of the administrators of a site, etc. Whenever you have an entity which has array relationships that contain entities that could be awarded points, it is currently impossible to target those related entities. I don't see why we shouldn't allow that though.
There are some issues to consider, like whether to award each of the array of targets only once if they are in the array twice, for example.
We might not do this in the initial version (probably won't at this point) but I wanted to put my thoughts down here.
Basically the idea is that we'd handle entity arrays similarly to the way we do in the conditions extension, but looping through them. I guess this is something that could be built into the API, probably into the reactor bootstrap though, not the firers. Needs more thought.