-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mw.user.acquireTempUserName #34
Conversation
Thanks for the patch. I'll keep an eye on https://gerrit.wikimedia.org/r/c/mediawiki/core/+/938957 and merge when that's merged - please ping me sooner if that merges before I notice. |
The core change has been merged. |
src/mockMediaWiki.js
Outdated
@@ -106,6 +106,7 @@ module.exports = function newMockMediaWiki() { | |||
isAnon: function () {}, | |||
isNamed: function () {}, | |||
isTemp: function () {}, | |||
acquireTempUserName: async function () { return null; }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to return a Promise now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes? It's a native promise, instead of a jQuery promise in the real code, but I think that shouldn't be a problem with how this is used (although I admit I haven't been able to test it). I thought you wouldn't want this project to depend on jQuery.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this returns a jquery deferred which has a promise method so I think it would not work as expected.
Your patch should be unblocked now regardless. I can test how it behaves in September and adjust it to have the promise method if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to use jQuery.
Added in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/938957
Needed by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/938960