-
Notifications
You must be signed in to change notification settings - Fork 197
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
RegistrationManager: Handle failing registration form request #652
Open
melvo
wants to merge
6
commits into
qxmpp-project:master
Choose a base branch
from
olomono:fix/registration-error
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://xmpp.org/extensions/xep-0077.html#usecases-cancel specifies the usage of the stream error <not-authorized/>. That is now handled as a valid response to the account deletion request instead of a result IQ stanza or in addition to it. The same applies to the stream error <conflict> since some servers send that instead of the <not-authorized/> stream error. There are servers closing the connection during account creation with a <connection-timeout/> stream error. That is now ignored.
This is needed if the server does not respond with a registration form. That can be the case if too many CAPTCHAs were not solved.
lnjX
requested changes
Sep 10, 2024
Comment on lines
284
to
299
|
||
Q_EMIT registrationFormReceived(iq); | ||
switch (iq.type()) { | ||
case QXmppIq::Result: | ||
info(u"Received registration form."_s); | ||
Q_EMIT registrationFormReceived(iq); | ||
break; | ||
case QXmppIq::Error: | ||
warning(u"Registration form could not be received: "_s.append(iq.error().text())); | ||
Q_EMIT registrationFailed(iq.error()); | ||
break; | ||
default: | ||
break; // should never occur | ||
} | ||
|
||
return true; | ||
} |
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 is a breaking change. Applications that used to listen for IQ errors on registrationFormReceived()
won't receive any feedback now.
If you want to split up the error case, create a new signal. But refactoring this to a task-based API would be more useful, I guess.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR check list:
\since QXmpp 1.X
,QXMPP_EXPORT
doc/doap.xml
clang-format -i src/<edited-file(s)> tests/<edited-file(s)>