From 8de2352e64c8353cfcd69d8ee1009d73196200d8 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 6 May 2024 11:13:33 -0400 Subject: [PATCH] fix: notifications for tag followers not being sent if author is a remote user --- src/topics/create.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/topics/create.js b/src/topics/create.js index 581017eff5..8a6c8dafe6 100644 --- a/src/topics/create.js +++ b/src/topics/create.js @@ -153,8 +153,11 @@ module.exports = function (Topics) { analytics.increment(['topics', `topics:byCid:${topicData.cid}`]); plugins.hooks.fire('action:topic.post', { topic: topicData, post: postData, data: data }); - if (parseInt(uid, 10) && !topicData.scheduled) { - user.notifications.sendTopicNotificationToFollowers(uid, topicData, postData); + if (!topicData.scheduled) { + if (utils.isNumber(uid)) { + // New topic notifications only sent for local-to-local follows only + user.notifications.sendTopicNotificationToFollowers(uid, topicData, postData); + } Topics.notifyTagFollowers(postData, uid); categories.notifyCategoryFollowers(postData, uid); }