FIX: PM participants list refreshing after inviting

FIX: PM participants list refreshing after inviting

When inviting users to a PM a small post is created showing that you invited the user, but the actual list of participants never updated until you refreshed the page or interacted with the private-message-map widget triggering it to refresh. This change will trigger a refresh on the private-message-map widget ensuring that the UI is updated with the current list of participants.

diff --git a/app/assets/javascripts/discourse/app/components/invite-panel.js b/app/assets/javascripts/discourse/app/components/invite-panel.js
index 0866fbf..42308e2 100644
--- a/app/assets/javascripts/discourse/app/components/invite-panel.js
+++ b/app/assets/javascripts/discourse/app/components/invite-panel.js
@@ -366,7 +366,7 @@ export default Component.extend({
             this.get("inviteModel.details.allowed_users").pushObject(
               EmberObject.create(result.user)
             );
-            this.appEvents.trigger("post-stream:refresh");
+            this.appEvents.trigger("post-stream:refresh", { force: true });
           } else if (
             this.invitingToTopic &&
             emailValid(this.emailOrUsername.trim()) &&

GitHub sha: 149801f9

1 Like