Open literakl opened 4 years ago
Text:
Zdravíme z portálu Mezi námi řidiči,
na základě nastavení vašeho účtu vám posíláme, co se událo nového. Pokud vás tyto informace již nezajímají, na konci emailu je můžete jedním kliknutím odhlásit.
Vyšla nová anketa: Jízda bez zapnutého pásu Co si o tom myslíte? Je to pohoda, nebo na kriminál?
Je živo v diskusích, kterých se účastníte.
Pod vašimi komentáři přibyly reakce v těchto diskusích:
Nehoda u Rožmitálu, komentářů: 36, poslední 12:35 Změny v bodovém hodnocení, komentářů: 62, poslední 18:49
Přejeme spoustu kilometrů bez nehody. A hlavně klid!
Váš tým Mezi námi řidici
Odhlásit upozornění na novou anketu Odhlásit upozornění na nové reakce
Send email, only when all conditions are met
1) new poll was published this day and the user allowed new poll notifications. This is a link to poll with its title. 2) user allowed reaction notifications. Find all discussions he participated and find if there is reply from this day. List the links to items with such discussions, append total number of all comments in the discussion and the time of the last comment. 3) link to unsubscribe poll notifications with one click 4) link to unsubscribe discussion reaction notifications with one click.
Link to unsubscribe will display user mail settings screen and message that he we unsubscribed for particular notification.
Reaction rules:
Monday: user commented some poll and somebody else commented in the same thread (add reply) later. User will receive the notification for this poll Tuesday: somebody added another reply to the same thread. User will receive the notification for this poll Wednesday: nobody added a reply to any of threads where the user participated User will NOT receive notification for this item.
related task: #68 it has to be implemented too
It is important to understand that a reply notification is triggered only when somebody else wrote a reply to the same thread as the user AFTER the user. If there is a reply in another thread where user has not participated then this will not cause the discussion to be included. User1 will receive a notification for this discussion because of 1a and 2c comments. User2 will not receive a notification for this discussion, because his own last comment 2c is the latest and he has already seen all comments in his thread. User3 will receive a notification for this discussion because of 3f comment.
Added daily email notification feature.
Review the branch https://github.com/literakl/mezinamiridici/tree/85-daily-notifications and test it. Fix isssues and prepare a merge request.
New assignment
When any of the selected triggers occurs during the period, the email is generated and scheduled. Timestamp will be saved.
Send an email to users at 9:00 PM when: