Mooeypoo has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/260410

Change subject: Only update seenTime in the local API
......................................................................

Only update seenTime in the local API

Do not send an update to 'seenTime' to remote wikis; only update
the items that are in the local API.

Bug: T121928
Change-Id: I291ecdb53364327dbdcb769c0d93512eeed3ab29
---
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/10/260410/1

diff --git a/modules/viewmodel/mw.echo.dm.NotificationsModel.js 
b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
index 4dfb691..1f53b44 100644
--- a/modules/viewmodel/mw.echo.dm.NotificationsModel.js
+++ b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
@@ -314,7 +314,7 @@
         * @fires updateSeenTime
         */
        mw.echo.dm.NotificationsModel.prototype.updateSeenTime = function ( 
type ) {
-               var i, len,
+               var i, len, promise,
                        items = this.unseenNotifications.getItems();
 
                type = type || this.type;
@@ -325,7 +325,14 @@
                }
                this.emit( 'updateSeenTime' );
 
-               return this.getApi().updateSeenTime( type )
+               // Only update seenTime in the API locally
+               if ( !this.isExternal() ) {
+                       promise = this.getApi().updateSeenTime( type );
+               } else {
+                       promise = $.Deferred().resolve();
+               }
+
+               return promise
                        .then( this.setSeenTime.bind( this ) );
        };
 

-- 
To view, visit https://gerrit.wikimedia.org/r/260410
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I291ecdb53364327dbdcb769c0d93512eeed3ab29
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <mor...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to