Not receiving notifications for announcements

AI-generated summary

Not receiving notifications for announcements

LeoMcA reported not receiving notifications for announcements despite having #feature:announcements set to Watching. david suggested that the issue might be related to posts being drafted as PMs or shared drafts, which don’t send notifications.

After testing, david found that publishing a shared draft in a watched category triggers a notification, but making a PM public and recategorizing it does not. jomaxro confirmed that the last three release notes were created using shared drafts, which might have caused the issue.

A fix was proposed by sam, and tgxworld applied a change that should fix the issue. However, LeoMcA reported that the problem persisted.

codinghorror suggested that the issue might be related to posting as a shared draft, and david eventually identified the regression and submitted a PR to fix it. The fix is now merged, and future #feature:announcements should trigger notifications correctly, as confirmed by david.

I have #feature:announcements set to Watching, but for the past 3 or so sets of release notes (like this one) I haven’t received a notification for it, and have only found it in my New list.

Once I open the topic, it says that it is set to Watching, despite my not receiving a notification for it.

5 Likes

I would guess that the post is being drafted either as a PM or a ‘shared draft’, and therefore notifications are not being sent. See here:

and more recently here:

It looks like @tgxworld applied a related fix here

I just tried a few things locally:

  • Watching #announcements
    • “Make PM Public”, then recategorise to #announcements
    • No notification received :x:
  • Watching #annoucements
    • “Publish shared draft”
    • Notification received :white_check_mark:
  • Watching first post #announcements
    • “Publish shared draft”
    • Notification not received :x:
10 Likes

@david very likely has the right idea. The last 3 or so release notes were created using the shared drafts feature. Previous notes were drafted elsewhere and posted “normally”. It looks like @tgxworld’s recent change likely fixed watching #feature:announcements, but we should probably fix the other 2 issues.

10 Likes

@tgxworld I would like you to fix this, this week if you have some time

A minimal fix here is that if a topic with 1 post is recategorized to a “watching” category notifications should go out.

It is a bit tricky here cause, what happens when you move something to #feature:announcements and then move it out of #feature:announcements ? We need to remove the watching status from all the people to be “correct”

1 Like

There is also the two full seconds of 307 SQL commands that somehow issue when you rename and recategorize a topic.

2 Likes

@david Was this not working for you even with FIX: Retrigger notification when a topic is recategorized. · discourse/discourse@ee1eb1a · GitHub applied?

This case is fixed in

https://github.com/discourse/discourse/commit/147ea37115d043caf6b547933b97eabf34e9f27e

I tested this locally and it looks we we already do this.

4 Likes

I just tried again and this works fine, so I must have messed something up when testing. Sorry for the confusion!

3 Likes

No worries! Thank you for working out the 3 scenarios!

1 Like

Unfortunately it doesn’t look like this is completely fixed, as it happened again for me with: Discourse 2.1.0 beta 2 Release Notes (I got no notification, only appeared in New, appeared as Watching once I opened it)

3 Likes

I’m 80% sure this has to do with posting as a ‘shared draft’, perhaps?

3 Likes

@david can you have a look at the shared draft case?

5 Likes

It looks like most of the cases described above regressed 2 months ago, but this wasn’t picked up in the tests (because Sidekiq jobs don’t run normally in a test environment). Here’s a PR to fix:

https://github.com/discourse/discourse/pull/6108

12 Likes

This is now merged, so future #feature:announcements should trigger notifications correctly :slight_smile:

12 Likes

This topic was automatically closed after 14 days. New replies are no longer allowed.