We’ve just had a situation on a forum where we’ve had a user post to a category being watched by other users. However, given the nature of their query, it was converted to a PM within 3 minutes by a moderator.
Although it was converted to a PM, it seems to have still triggered an email to those watching the category it was originally posted to, which doesn’t seem right to me. I would have expected the email not to have been sent as it was converted to a private/personal message.
L’utente B avvia un nuovo thread nella stessa categoria
Un moderatore converte il post di B in un messaggio privato tra lui e B, in breve tempo (ad es. < 5 minuti)
L’utente A riceve comunque un’email che lo avvisa del nuovo post x minuti dopo la creazione del post
Sono riuscito a replicare il problema con due account di prova. L’email viene comunque inviata all’utente A (ma non può visualizzare il messaggio completo se ci clicca sopra).
Non sono un esperto di Discourse, ma da quanto riesco a vedere, l’argomento attiva il job pianificato in Sidekiq, che viene poi inviato x minuti dopo la creazione dell’argomento.
At the point of being converted to a PM, the email is still sat in Sidekiq. I’m not going to say I’m a Discourse expert, or even say I understand how it works (because I don’t - I just love its format and a member of several Discourse powered sites), so I’m not sure if it could be prevented.
Perhaps a timeline of events could help explain the situation:
5:20pm - User A posts publicly
5:21pm - Mod converts post to a PM
5:30pm - User B receives the “New post” email, with a subject of [Site Site][PM] New Topic
Just after the post was converted, there was a Jobs::UserEmail event in Sidekiq for the new topic.
Only speaking for myself (hosted by Discourse), it seems like my emails land pretty much immediately after a post. I have mailing list mode turned on, send me mail even if I’m on the site, that sort of thing. You might be able to call it back if it hadn’t been sent, but that seems like a race. In this case it was close, but if it had happened after the mod had logged off it likely would have sat there much longer.
The defaults (configurable via site settings) are 20 seconds after posting for personal message notifications, and 10 minutes for all other notifications. The relevant site settings are personal email time window seconds and email time window mins.