This commit is contained in:
APerson 2016-02-26 09:44:36 -05:00
commit 39e285c4c1

View File

@ -711,11 +711,11 @@
*/
notifyUser: function ( user, options ) {
var deferred = $.Deferred(),
userTalkPage = new mw.Title( user, 3 ), // User talk namespace
userTalkPageExists = userTalkPage.exists();
userTalkPage = new AFCH.Page( new mw.Title( user, 3 ).getPrefixedText() ); // 3 = user talk namespace
AFCH.actions.editPage( userTalkPage.getPrefixedText(), {
contents: ( userTalkPageExists ? '' : '{{Talk header}}' ) + '\n\n' + options.message,
userTalkPage.exists().done( function ( exists ) {
userTalkPage.edit( {
contents: ( exists ? '' : '{{Talk header}}' ) + '\n\n' + options.message,
summary: options.summary || 'Notifying user',
mode: 'appendtext',
statusText: 'Notifying',
@ -727,6 +727,7 @@
.fail( function () {
deferred.reject();
} );
} );
return deferred;
},