mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 02:00:57 +00:00
Show relevant user in local suggestions on user talk pages
Bug: T273324 Change-Id: I60e550efbea3d9e250dcaf13080407094a23aad3
This commit is contained in:
parent
89dd44bb35
commit
b581883e7c
|
@ -17,7 +17,8 @@ var controller = require( 'ext.discussionTools.init' ).controller;
|
|||
* @param {ve.ui.Surface} surface Surface to act on
|
||||
*/
|
||||
function MWUsernameCompletionAction( surface ) {
|
||||
var action = this;
|
||||
var action = this,
|
||||
relevantUserName = mw.config.get( 'wgRelevantUserName' );
|
||||
|
||||
// Parent constructor
|
||||
MWUsernameCompletionAction.super.call( this, surface );
|
||||
|
@ -34,6 +35,10 @@ function MWUsernameCompletionAction( surface ) {
|
|||
action.localUsers.push( user );
|
||||
}
|
||||
} );
|
||||
if ( relevantUserName && this.localUsers.indexOf( relevantUserName ) === -1 ) {
|
||||
this.localUsers.push( relevantUserName );
|
||||
this.localUsers.sort();
|
||||
}
|
||||
this.remoteUsers = [];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue