See who is watching a topic

AI-generated summary

The discussion revolves around the idea of being able to see who is watching a topic in Discourse. aidanheerdegen proposes this feature, citing its importance in their forum where they use locked topics as mailing lists. They find the current inability to view topic watchers limiting and are looking for a workaround.

Heliosurge suggests using the Data Explorer plugin with a custom query script. Canapin agrees and provides a sample SQL query to achieve this:

--  [params]
-- topic_id :topic_id

SELECT user_id, topic_id, notification_level
FROM topic_users
WHERE topic_id = :topic_id
ORDER BY id DESC

Lastly, pfaffman proposes an alternative solution, suggesting the development of a plugin to display the list of people watching the topic.

In our forum we use locked topics as mailing lists:

This is a great feature. Anyone with high enough trust level can make a mailing list with very little effort, allowing for extremely targeting communications only to those with a specific interest. We have a very broad user community, so this is essential.

A missing feature is for the person who started the topic, or anyone with sufficient privileges, being able to see who is following a topic. This is important to know if the messages being sent are reaching the people who need to see them.

Are there any plans for this to become a feature? If not, is there a way we can put this on a to-do list? In the mean time what is the best way to get this information? I assume an SQL query in Data Explorer? A similar question about watched topics is the best I can do in terms of prior art, but I’ll need to ensure mailing lists have a specific tag and filter for that so I can find the correct topics, but if there is a better way happy to hear it.

I can’t say for sure. But I believe you could likely use the Data Explorer plugin with a custom query script.

Hello Aidan :slight_smile:

Yes, I don’t think this feature has already been considered, it seems to be of a rare usefulness.
However, you can achieve it with a Data Explorer query such as:

-- [params]
-- topic_id :topic_id

SELECT user_id, topic_id, notification_level
FROM topic_users
WHERE topic_id = :topic_id
ORDER BY id DESC

You could make a plugin that would add the list of people watching the topic to the serializer and then add something in a theme component that would display that somewhere.