flarum / issue-archive

0 stars 0 forks source link

Approval should allow noification email just to approved messages #84

Open PeopleInside opened 3 years ago

PeopleInside commented 3 years ago

Bug Report

Current Behavior

Post queued for moderation are sent by email in some cases, this should be happen just after the approval action.

You can reproduce the issue if you are using one of this extensions:

Seems approval allow to send email to post that are not yet approved. If all post under a specific tag need to be approved before be visible and some member follow this tag with the Follow Tag extension than a spammer create a post that is put in the moderation queue, users will get the notification email also if the post has not been approved.

The same issue happen with Byobu private message: I Use first post approval extension, if a new user send a private message this is put on queue moderation and is notified by email. This cause the issue that member that are not an admin will be unable to see the private message that has been notified by email.

When the private message will be get approved, no email notification will be sent.

What I expect is that messages are notified by email only after they has been approved.

I start also a discussion on Flarum: https://discuss.flarum.org/d/27438-post-under-moderation-has-been-sent-by-email

Expected Behavior

Messages queue for moderation should never generate an email alert to users; just after the post has been approved notifications email should be sent!

Screenshots Not applicable

Environment

Output of "php flarum info", run this in terminal in your Flarum directory.
Loaded extensions: Core, date, libxml, pcre, dom, fileinfo, filter, hash, json, SPL, bz2, posix, Reflection, session, SimpleXML, standard, xml, xmlreader, xmlwriter, bcmath, openssl, calendar, ctype, curl, dba, mbstring, ftp, gd, gettext, gmp, iconv, imap, intl, ldap, mailparse, exif, memcached, zlib, pcntl, PDO, pdo_sqlite, shmop, soap, sockets, sodium, sqlite3, sysvsem, sysvshm, tidy, tokenizer, xmlrpc, xsl, zip, Phar, mysqlnd, mysqli, pdo_mysql, ionCube Loader, Zend OPcache
+-------------------------------------+--------------+--------+
| Flarum Extensions                   |              |        |
+-------------------------------------+--------------+--------+
| ID                                  | Version      | Commit |
+-------------------------------------+--------------+--------+
| flarum-flags                        | v1.0.0       |        |
| flarum-approval                     | v1.0.0       |        |
| flarum-tags                         | v1.0.1       |        |
| flarum-suspend                      | v1.0.0       |        |
| flarum-markdown                     | v1.0.1       |        |
| flarum-subscriptions                | v1.0.0       |        |
| fof-spamblock                       | 1.0.0        |        |
| fof-oauth                           | 1.0.0        |        |
| fof-byobu                           | 1.0.0-beta.3 |        |
| dem13n-topic-starter-label          | 0.1.5        |        |
| fof-share-social                    | 1.0.0        |        |
| v17development-seo                  | v1.8.0       |        |
| askvortsov-rich-text                | v2.0.3       |        |
| fof-linguist                        | 1.0.0        |        |
| fof-terms                           | 1.0.0        |        |
| clarkwinkelmann-first-post-approval | 1.0.0        |        |
| fof-follow-tags                     | 1.0.0        |        |
| fof-username-request                | 1.0.0        |        |
| fof-split                           | 1.0.0        |        |
| fof-cookie-consent                  | 1.0.0        |        |
| fof-disposable-emails               | 1.0.0        |        |
| clarkwinkelmann-emojionearea        | 1.0.0        |        |
| fof-nightmode                       | 1.0.0        |        |
| fof-stopforumspam                   | 1.0.0        |        |
| flarum-emoji                        | v1.0.0       |        |
| flarum-pusher                       | v1.0.0       |        |
| fof-user-bio                        | 1.0.0        |        |
| fof-default-user-preferences        | 1.0.0        |        |
| nearata-lang-italian                | v1.1.0       |        |
| flarum-akismet                      | v1.0.0       |        |
| flarum-statistics                   | v1.0.0       |        |
| flarum-lang-english                 | v1.0.0       |        |
| flarum-sticky                       | v1.0.0       |        |
| flarum-mentions                     | v1.0.0       |        |
| flarum-lock                         | v1.0.0       |        |
| flarum-likes                        | v1.0.0       |        |
| flarum-bbcode                       | v1.0.0       |        |
| noriods-auto-more                   | v1.0.0       |        |
| fof-links                           | 1.0.0        |        |
| fof-moderator-notes                 | 1.0.0        |        |
| fof-recaptcha                       | 1.0.0        |        |
| ianm-synopsis                       | 1.0.0        |        |
| fof-drafts                          | 1.0.0        |        |
| fof-formatting                      | 1.0.0        |        |
+-------------------------------------+--------------+--------+
Base URL: https://community.peopleinside.it

Possible Solution

Email alert should be sent only after approval.