mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
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:
parent
306c597be9
commit
3828f29160
|
@ -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 ) );
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue