FIX: Error loading suggested topics for anon users. (#14485)

FIX: Error loading suggested topics for anon users. (#14485)

Follow-up to fc1fd1b41689694b3916dc4e10605eb9b8bb89b7

diff --git a/app/assets/javascripts/discourse/app/models/post-stream.js b/app/assets/javascripts/discourse/app/models/post-stream.js
index 62b96e7..939b684 100644
--- a/app/assets/javascripts/discourse/app/models/post-stream.js
+++ b/app/assets/javascripts/discourse/app/models/post-stream.js
@@ -1252,6 +1252,8 @@ export default RestModel.extend({
       suggested_group_name: result.suggested_group_name,
     });
 
-    this.pmTopicTrackingState.startTracking();
+    if (this.topic.isPrivateMessage) {
+      this.pmTopicTrackingState.startTracking();
+    }
   },
 });

GitHub sha: f38fd1a5a7e2b5a29f7ce80e2adb1e8e020d7595

This commit appears in #14485 which was approved by SamSaffron. It was merged by tgxworld.