-
Notifications
You must be signed in to change notification settings - Fork 28
#41 #45 Solved problem with error Check your credentials. #46
base: master
Are you sure you want to change the base?
Conversation
@delthas Could you take a look? it's been waiting for a few months already. |
delthas#45 Solved login and contact listing problems. Added IDLE status.
…nite loop on login for some accounts; Added condition for skype4business contacts
…for first and last names
@@ -675,7 +675,9 @@ public synchronized void disconnect() { | |||
} | |||
|
|||
private synchronized void sendPacket(String command, String parameters, String body) throws IOException { | |||
String headerString = registration != null ? "Registration: " + registration + "\r\n" : ""; | |||
// String headerString = registration != null ? "Registration: " + registration + "\r\n" : ""; | |||
// Weird, but it's working better without sending the registration token. Solved the 911 problem but needs more testing. |
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 suprising indeed, maybe they removed recently like they removed Challenge. Let's include this change for now if its works for you.
@@ -247,6 +248,14 @@ void setPresence(Presence presence, boolean triggerListeners) { | |||
} | |||
} | |||
|
|||
String getLiveUsername() { |
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 made these private, probably doesn't need to be in the library public api)
@@ -118,7 +124,7 @@ private User updateUser(JSONObject userJSON, boolean newContactType) throws Pars | |||
String userAvatarUrl = null; | |||
try { | |||
if (!newContactType) { | |||
userUsername = userJSON.getString("username"); | |||
userUsername = userJSON.optString("username"); |
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 code will only be executed for the current user. If username is null, userUsername will be empty, which will set the current User username to the empty string. This will request "https://contacts.skype.com/contacts/v2/users//contacts" immediately after in WebConnector.java:93, which cannot work. Set this to getString maybe?
JSONObject nameJSON = profileJSON.getJSONObject("name"); | ||
userFirstName = nameJSON.optString("first", null); | ||
userLastName = nameJSON.optString("surname", 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.
I removed the default set-s for firstName and lastName, since when not set we should return null and let the library user decide what to do, rather than return a default value ourselves.
Handle the case where username is not set for the logged in user at WebConnector.java:127, or make the field not optional, otherwise LGTM (although I haven't tested it). |
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.
It solved the issue for me (with a mail address like @ and a live username like _
No description provided.