こんにちは、皆さん。
フォーラムで、他のユーザーが監視しているカテゴリに投稿がなされるという事態が発生しました。しかし、投稿内容の性質上、モデレーターによって3分以内にプライベートメッセージ(PM)に変換されました。
PM に変換されたにもかかわらず、元々投稿されたカテゴリを監視しているユーザーに対してメールが送信されたようです。これは正しくないように思えます。プライベートメッセージ(個人間メッセージ)に変換されたのであれば、メールは送信されないはずだと私は考えていました。
こんにちは、皆さん。
フォーラムで、他のユーザーが監視しているカテゴリに投稿がなされるという事態が発生しました。しかし、投稿内容の性質上、モデレーターによって3分以内にプライベートメッセージ(PM)に変換されました。
PM に変換されたにもかかわらず、元々投稿されたカテゴリを監視しているユーザーに対してメールが送信されたようです。これは正しくないように思えます。プライベートメッセージ(個人間メッセージ)に変換されたのであれば、メールは送信されないはずだと私は考えていました。
oh my - if that’s happening then it’s a serious bug. are you able to replicate it? e.g.
念のため確認ですが、
2 つのテストアカウントを使用して再現に成功しました。メールはユーザー A に送信されます(ただし、クリックして開いても全文は表示されません)。
Discourse の専門家ではありませんが、私の見解では、トピックが Sidekiq のスケジュールジョブをトリガーし、それがトピック作成から x 分後に送信されているようです。
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.
That’s correct - thankfully! ![]()
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:
[Site Site][PM] New TopicJust 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.
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.