@@ -92,8 +92,8 @@ export class AddonMessagesDiscussionsComponent implements OnDestroy {
9292 discussion . unread = false ;
9393
9494 // Conversations changed, invalidate them and refresh unread counts.
95- this . messagesProvider . invalidateConversations ( ) ;
96- this . messagesProvider . refreshUnreadConversationCounts ( ) ;
95+ this . messagesProvider . invalidateConversations ( this . siteId ) ;
96+ this . messagesProvider . refreshUnreadConversationCounts ( this . siteId ) ;
9797 }
9898 }
9999 } , this . siteId ) ;
@@ -145,10 +145,10 @@ export class AddonMessagesDiscussionsComponent implements OnDestroy {
145145 */
146146 refreshData ( refresher ?: any , refreshUnreadCounts : boolean = true ) : Promise < any > {
147147 const promises = [ ] ;
148- promises . push ( this . messagesProvider . invalidateDiscussionsCache ( ) ) ;
148+ promises . push ( this . messagesProvider . invalidateDiscussionsCache ( this . siteId ) ) ;
149149
150150 if ( refreshUnreadCounts ) {
151- promises . push ( this . messagesProvider . invalidateUnreadConversationCounts ( ) ) ;
151+ promises . push ( this . messagesProvider . invalidateUnreadConversationCounts ( this . siteId ) ) ;
152152 }
153153
154154 return this . utils . allPromises ( promises ) . finally ( ( ) => {
@@ -171,7 +171,7 @@ export class AddonMessagesDiscussionsComponent implements OnDestroy {
171171
172172 const promises = [ ] ;
173173
174- promises . push ( this . messagesProvider . getDiscussions ( ) . then ( ( discussions ) => {
174+ promises . push ( this . messagesProvider . getDiscussions ( this . siteId ) . then ( ( discussions ) => {
175175 // Convert to an array for sorting.
176176 const discussionsSorted = [ ] ;
177177 for ( const userId in discussions ) {
@@ -184,7 +184,7 @@ export class AddonMessagesDiscussionsComponent implements OnDestroy {
184184 } ) ;
185185 } ) ) ;
186186
187- promises . push ( this . messagesProvider . getUnreadConversationCounts ( ) ) ;
187+ promises . push ( this . messagesProvider . getUnreadConversationCounts ( this . siteId ) ) ;
188188
189189 return Promise . all ( promises ) . catch ( ( error ) => {
190190 this . domUtils . showErrorModalDefault ( error , 'addon.messages.errorwhileretrievingdiscussions' , true ) ;
@@ -216,7 +216,7 @@ export class AddonMessagesDiscussionsComponent implements OnDestroy {
216216 this . loaded = false ;
217217 this . loadingMessage = this . search . loading ;
218218
219- return this . messagesProvider . searchMessages ( query ) . then ( ( searchResults ) => {
219+ return this . messagesProvider . searchMessages ( query , undefined , undefined , undefined , this . siteId ) . then ( ( searchResults ) => {
220220 this . search . showResults = true ;
221221 this . search . results = searchResults . messages ;
222222 } ) . catch ( ( error ) => {
0 commit comments