E-mails enviados para observadores de categoria mesmo após o tópico ser convertido em MP

Olá a todos,

Tivemos recentemente uma situação em um fórum onde um usuário publicou em uma categoria monitorada por outros usuários. No entanto, dada a natureza da pergunta, ela foi convertida em uma mensagem privada (MP) em 3 minutos por um moderador.

Embora tenha sido convertida em MP, parece que ainda disparou um e-mail para os usuários que monitoram a categoria onde foi originalmente postada, o que não me parece correto. Eu esperaria que o e-mail não fosse enviado, já que foi convertido em uma mensagem privada/pessoal.

1 curtida

oh my - if that’s happening then it’s a serious bug. are you able to replicate it? e.g.

  • create test accounts A and B
  • log in with account A and watch a category
  • log in with account B and create a topic in that category
  • receive email notification in account A
  • move topic into personal message
  • add reply as account B
  • receive email notification in account A

Apenas para esclarecer -

  • O Usuário A assiste à categoria
  • O Usuário B inicia um novo tópico na mesma categoria
  • O moderador converte a postagem de B em uma mensagem privada apenas entre eles e B, em um curto espaço de tempo (por exemplo, < 5 minutos)
  • O Usuário A ainda recebe um e-mail notificando-o sobre a nova postagem x minutos após a criação da postagem

Consegui replicar o problema usando duas contas de teste. O e-mail ainda é enviado para o Usuário A (mas ele não consegue visualizar a mensagem completa se clicar nela).

Não sou um especialista em Discourse, mas, pelo que pude observar, o tópico aciona o trabalho agendado no Sidekiq, que é então enviado x minutos após a criação do tópico.

1 curtida

To be clear, this is just the first post that was emailed, not the following private messages correct?

If that is the case I don’t see how you could prevent that to be honest, the email would have gone by the time someone converted it.

1 curtida

That’s correct - thankfully! :slight_smile:

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.

There is a window – I think it’s 30 seconds. @jomaxro can confirm.

1 curtida

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.

6 curtidas