Cleanup.
This commit is contained in:
parent
527530e89d
commit
a995ae2af5
2 changed files with 12 additions and 2 deletions
|
@ -33,8 +33,8 @@ public class AkismetSample {
|
|||
if (isSpam) {
|
||||
System.out.println("The comment is SPAM according to Akismet.");
|
||||
|
||||
final boolean hasBenSubmitted = akismet.submitSpam(comment);
|
||||
if (hasBenSubmitted) {
|
||||
final boolean hasBeenSubmitted = akismet.submitSpam(comment);
|
||||
if (hasBeenSubmitted) {
|
||||
System.out.println("The comment has been submitted as SPAM to Akismet");
|
||||
} else {
|
||||
System.err.println(akismet.getErrorMessage());
|
||||
|
|
|
@ -61,24 +61,34 @@ open class AkismetComment(val userIp: String, val userAgent: String) {
|
|||
companion object {
|
||||
/** A blog comment. */
|
||||
const val TYPE_COMMENT = "comment"
|
||||
|
||||
/** A top-level forum post. */
|
||||
const val TYPE_FORUM_POST = "forum-post"
|
||||
|
||||
/** A reply to a top-level forum post. */
|
||||
const val TYPE_REPLY = "reply"
|
||||
|
||||
/** A blog post. */
|
||||
const val TYPE_BLOG_POST = "blog-post"
|
||||
|
||||
/** A contact form or feedback form submission. */
|
||||
const val TYPE_CONTACT_FORM = "contact-form"
|
||||
|
||||
/** A new user account. */
|
||||
const val TYPE_SIGNUP = "signup"
|
||||
|
||||
/** A message sent between just a few users. */
|
||||
const val TYPE_MESSAGE = "message"
|
||||
|
||||
/** A pingback. */
|
||||
const val TYPE_PINGBACK = "pingback"
|
||||
|
||||
/** A trackback. */
|
||||
const val TYPE_TRACKBACK = "trackback"
|
||||
|
||||
/** A Twitter message. */
|
||||
const val TYPE_TWEET = "tweet"
|
||||
|
||||
/** Administrator role. If used, Akismet will always return false. */
|
||||
const val ADMIN_ROLE = "administrator"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue