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
This commit is contained in:
Moriel Schottlender 2015-12-21 10:49:11 -08:00
parent 306c597be9
commit 3828f29160

View file

@ -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 ) );
};