Jan 9 at 9:22 PM
Edited Jan 10 at 12:37 AM
I'm writing a basic contact form module (http://orchardcontactform.codeplex.com/). We want spam protection on the form. At first we modeled it very much on what the Orchard.Comments module was doing, which is using an Akismet .Net library directly.
It has occurred to me that it would be better if I could leverage Orchard.AntiSpam. So I refactored a local copy to inject the ISpamService from that module, and then use its CheckForSpam implementation.
I wanted to run this approach through this discussion board. Since I have the Orchard.AntiSpam listed as a dependency, my new approach seems better (for example, the service works with multiple spam services, not just Akismet), however it worries me that
the Orchard.Comments isn't doing this.
Does anyone know of why Orchard.Comments is using an Akismet API directly, or more to the point, any reason we can't just inject ISpamService and use it?
P.S. As an aside, does anyone know a good way to test this in dev? I don't want my email flagged on Akismet or anything, but it just feels weird to write code that can't really be tested until deployed to the wild.