Currently, the resulting action from a processor is essentially hardcoded into it. If you, say, wanted the PhashProcessor to create a report, rather than posting a comment, the only way to do so is to copy paste and change the code.
I envision this as introducing another interface, Outcome, that matches/accepts a list of flags and an intentionally unspecified data structure, that then takes some action against the content. Flags would be globbed to prevent multiple similar outcomes being generated.
In general, an outcome may generate a report from a list of flags, or remove a post given a flag. More specific outcomes that are coupled to the data structure and know how to handle it could be introduced for the PhashProcessor, allowing it to post a comment listing duplicate posts.
Currently, the resulting action from a processor is essentially hardcoded into it. If you, say, wanted the PhashProcessor to create a report, rather than posting a comment, the only way to do so is to copy paste and change the code.
I envision this as introducing another interface,
Outcome, that matches/accepts a list of flags and an intentionally unspecified data structure, that then takes some action against the content. Flags would be globbed to prevent multiple similar outcomes being generated.In general, an outcome may generate a report from a list of flags, or remove a post given a flag. More specific outcomes that are coupled to the data structure and know how to handle it could be introduced for the PhashProcessor, allowing it to post a comment listing duplicate posts.