1
0
mirror of https://github.com/flarum/core.git synced 2025-08-11 19:04:29 +02:00

Rewrite extension, call API manually, take advantage of features not supported by the current library (#24)

This PR updates the entire extension. It will not use a library that has not been updated for years, so it should work with newer versions of PHP.
Additionally, it sends more information to the Akismet API to make spam detection more accurate.
The Akismet class can be used by other extensions.

Todo:
- [x] Convert frontend to TypeScript
- [x] Call Akismet API manually
- [x] Option to remove blatant spam
- [x] Permission to bypass Akismet
- [x] Sending additional parameters like `is_test`

Nice to have, but can be left for another PR:
- [ ] Suspend obvious spamers
- [ ] Send  `blog_lang` parameter
- [ ] Checking post edits

Sponsored by [forum.android.com.pl](https://forum.android.com.pl/)
This commit is contained in:
Rafał Całka
2022-01-05 00:31:47 +01:00
committed by GitHub
parent a8937161db
commit 178f91aff9
17 changed files with 1773 additions and 1312 deletions

View File

@@ -7,10 +7,14 @@ flarum-akismet:
# Translations in this namespace are used by the admin interface.
admin:
# These translations are used in the Akismet Settings modal dialog.
# These translations are used in the Akismet Settings.
akismet_settings:
api_key_label: API Key
title: Akismet Settings
delete_blatant_spam_label: Automatically delete blatant spam
delete_blatant_spam_help: If Akismet has determined that the comment is blatant spam, instead of flagging, automatically delete post
permissions:
bypass_akismet: Bypass Akismet
# Translations in this namespace are used by the forum user interface.
forum: