Skip to content
This repository has been archived by the owner on Apr 9, 2019. It is now read-only.

#41 #45 Solved problem with error Check your credentials. #46

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

fabiodepin
Copy link

No description provided.

@ChmilevFA
Copy link

ChmilevFA commented Jun 13, 2018

@delthas Could you take a look? it's been waiting for a few months already.
I've tried this fix and it works for me.

Renan de Souza and others added 4 commits June 29, 2018 11:03
delthas#45 Solved login and contact listing problems. Added IDLE status.
…nite loop on login for some accounts; Added condition for skype4business contacts
@@ -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.
Copy link
Owner

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() {
Copy link
Owner

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");
Copy link
Owner

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);

Copy link
Owner

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.

@delthas
Copy link
Owner

delthas commented Jul 2, 2018

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).

Copy link

@proggler23 proggler23 left a 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 _

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants