Skip to content

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.

  1. Checkout branch locally
  2. Goto src/Modules/Message/MessageTransactions.php and change the value 600 to 10 in line 53
    if (!isset($sessdata[$recipient['id']]) || (time() - $sessdata[$recipient['id']]) > 600) {
  3. Login as amb (bot)
  4. Open the default store and send a chat message
  5. Open http://localhost:18084 (MailDev). You should have a mail for storemanager1 and user2.
  6. Open http://localhost:18081 (phpmyAdmin)
  7. Change the date in table fs_foodsaver and user storemanager1 the column last_login to smaller than 3 months
  8. Send a mail again as amb
  9. 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.

Edited by Christian Walgenbach

Merge request reports