Skip to content
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

Merged
merged 1 commit into from
Aug 14, 2023
Merged

Conversation

@jdlrobson
Copy link
Member

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.

@MatmaRex
Copy link
Contributor Author

MatmaRex commented Aug 9, 2023

The core change has been merged.

@@ -106,6 +106,7 @@ module.exports = function newMockMediaWiki() {
isAnon: function () {},
isNamed: function () {},
isTemp: function () {},
acquireTempUserName: async function () { return null; },
Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

Copy link
Member

@jdlrobson jdlrobson Aug 12, 2023

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to use jQuery.

@jdlrobson jdlrobson merged commit 6a06d2e into wikimedia:master Aug 14, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants