Closed Bug 1176115 Opened 9 years ago Closed 6 years ago

Add contact with invalid username silently fails

Categories

(Instantbird Graveyard :: Contacts window, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: arlolra, Assigned: arlolra)

References

Details

Attachments

(1 file)

Attached patch error.patchSplinter Review
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36

Steps to reproduce:

Tried to add a contact but forgot an @ in xmpp


Actual results:

Nothing


Expected results:

Invalid username warning
Attachment #8624541 - Attachment is patch: true
Attachment #8624541 - Attachment mime type: text/x-patch → text/plain
Attachment #8624541 - Flags: review?(clokep)
(In reply to arlolra from comment #0)
> Steps to reproduce:
> 
> Tried to add a contact but forgot an @ in xmpp

Can you please expand these STR to be a list of steps? I'm not really sure what you did and what occurred.
Comment on attachment 8624541 [details] [diff] [review]
error.patch

Review of attachment 8624541 [details] [diff] [review]:
-----------------------------------------------------------------

::: im/content/addbuddy.js
@@ +60,5 @@
> +      account.addBuddy(tag, name);
> +      return true;
> +    } catch(e) {
> +      if (/Invalid username/.test(e.message)) {
> +        error.textContent = "Invalid username";

This would need to be a translated string.

What is the test for "Invalid username" for? I suspect that's a message that only exists in the XMPP code. I.e. that won't pass review.
Attachment #8624541 - Flags: review?(clokep) → review-
1) connect to an xmpp account
2) File > Add Contact
3) choose the above xmpp account
4) type a username but omit the @ (ie. thisismyfriend)
5) click "Ok"

Observe the silent fail. The Error Console reports the "Invalid username" was thrown.
(In reply to arlolra from comment #3)
> 1) connect to an xmpp account
> 2) File > Add Contact
> 3) choose the above xmpp account
> 4) type a username but omit the @ (ie. thisismyfriend)
> 5) click "Ok"
> 
> Observe the silent fail. The Error Console reports the "Invalid username"
> was thrown.

If you change the throw in XMPP to throw an Error object, you can test for the type of the error more robustly than checking the string.
Assignee: nobody → arlolra
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
On the behalf of Florian:
Closing bugs related to the Instantbird UI as WONTFIX, as the development of the standalone chat client Instantbird has stopped. Instantbird users are encouraged to migrate to Thunderbird. The user interface of instant messaging in Thunderbird will feel familiar, as the Thunderbird IM support started as a fork of Instantbird.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: