Send chat notifications by mail, only last login is less than 6 months away
Closes no issue
What does this MR do?
Only send chat notifications by mail, if the last login is greater than 3 months.
How confident are you it won't break things if deployed?
(be honest!)
Links to related issues
https://yunity.slack.com/archives/C1T1ZM9A4/p1594584815235800
How to test
Steps a reviewer can take to verify that this MR does what it says it does e.g.
- Checkout branch locally
- Goto src/Modules/Message/MessageTransactions.php and change the value
600
to10
in line 53
if (!isset($sessdata[$recipient['id']]) || (time() - $sessdata[$recipient['id']]) > 600) {
- Login as amb (bot)
- Open the default store and send a chat message
- Open http://localhost:18084 (MailDev). You should have a mail for storemanager1 and user2.
- Open http://localhost:18081 (phpmyAdmin)
- Change the date in table fs_foodsaver and user storemanager1 the column
last_login
to smaller than 3 months - Send a mail again as amb
- You should received only a mail for user2.
Screenshots (if applicable)
Any relevant screenshots if this is a design / frontend change
Checklist
-
added a test, or explain why one is not needed/possible... -
no unrelated changes -
asked someone for a code review -
set a "for:" label to indicate who will be affected by this change -
use "state:" labels to track this MR's state until it was beta tested -
added an entry to CHANGELOG.md -
add a short text that can be used in the release notes -
Once your MR has been merged, you are responsible to create a testing issue in Beta Testing Repo: - Consider writing a detailed description in German.
- Describe in a few sentences, what should be tested from a user perspective.
- Also mention different settings (e.g. different browsers, roles, ...). how this change can be tested.
- Be aware, that also non technical people should understand.
Release notes text
Chat-Benachrichtigung per Mail werden nicht mehr gesendet, wenn man länger als 6 Monate nicht eingeloggt ist. Nach einem erneuten Login werden diese dann wieder verschickt.