delthas / JavaSkype

A lightweight, comprehensive Java API for Skype using MSNP24
MIT License
72 stars 28 forks source link

Moods are broken. #10

Closed MrPowerGamerBR closed 8 years ago

MrPowerGamerBR commented 8 years ago

When you try to get a user's mood, it returns null instead of the users mood.

MrPowerGamerBR commented 8 years ago

Also, I'm not using the latest commit (I'm using a build from this commit: https://github.com/Delthas/JavaSkype/commit/a37d5afebbdc3b54f7b4573548197eff0bab9e08 ) because the latest one is giving errors, so maybe this bug isn't happening on newer version.

delthas commented 8 years ago

That's normal actually. Sometimes the user's mood is not visible so Skype doesn't send it. For example if you try getting the mood of a user you're not friends with, it will probably not be visible.

As per the Javadoc for the function:

The mood (status) of this user, or null if not visible.

There may actually be a way to get the user mood even though you're not friends though, and I'll try to implement that soon.

MrPowerGamerBR commented 8 years ago

But all of my contacts are returning null instead of the mood. (And yes, I'm friends with them)

Just a FYI to help you a bit (or not), every Skype API for Java has broken moods except Skype4J.

Em 2 de ago de 2016 09:25, "Delthas" notifications@github.com escreveu:

That's normal actually. Sometimes the user's mood is not visible so Skype doesn't send it. For example if you try getting the mood of a user you're not friends with, it will probably not be visible.

As per the Javadoc for the function:

The mood (status) of this user, or null if not visible.

There may actually be a way to get the user mood even though you're not friends though, and I'll try to implement that soon.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Delthas/JavaSkype/issues/10#issuecomment-236888262, or mute the thread https://github.com/notifications/unsubscribe-auth/AJDnJ8ok5qcIQVYfst-tnIhqlz-6PBlpks5qbzcagaJpZM4JZ_fy .

delthas commented 8 years ago

(The issue closed itself apprently because of the "fixes #10" part of the commit message.)

I added new endpoints to fetch the moods. I think most friends moods should be non-null now. Could you please download the lastest version (1.0.9) and tell me if that's the case? Thanks.

MrPowerGamerBR commented 8 years ago

@Delthas seems to be working without any issues :)

package com.mrpowergamerbr.wow;

import java.io.IOException;

import fr.delthas.skype.Skype;
import fr.delthas.skype.User;

public class Testing {
    public static void main(String[] args) {
        Skype skype = new Skype("username", password");
        try {
          skype.connect(); // Will block until we're connected
        } catch (IOException | InterruptedException e) {
          System.err.println("An error occured while connecting...");
          e.printStackTrace();
        }

        System.out.println("Contacts: " + skype.getContacts().size());
        for (User usr : skype.getContacts()) {
            System.out.println(usr.getUsername() + " - " + usr.getPresence() + " - " + usr.getMood());
        }

    }
}
Contacts: 41
live:kaioeduardonunes - AWAY - vorti ^^
kaluc-7 - AWAY - ...
matheus.pinheiro123 - BUSY - Sem Animação pra nada
mrpowergamerbr - OFFLINE - null
facebook:rrsiqueira - OFFLINE - visite https://www.youtube.com/channel/UCEstdEITK5xp-r7maP83Usw
nathan.guedes1 - BUSY - JairoCraft - http://www.jairocraft.com.br
facebook:app7ico3svc.2quejgaig4. - OFFLINE - null
nilzinha.br - ONLINE - Dinheiro não traz felicidade, mas se vc usar-lo pra comprar comida dá no mesmo
facebook:juninho.stocker - OFFLINE - Almento preço mermo , não gosto ? FODA-SE
bruno10223 - OFFLINE - null
live:douguinhanr - ONLINE - ---Oque eu sou ninguem vai mudar---
dancerbuilder21 - AWAY - SkySpace Network (http://skyspace.esy.es)
nicolas.arantes6 - OFFLINE - Solado Maluko
tututizinho1 - OFFLINE - null
viciogamesbr.suporte - OFFLINE - null
nothavedream - OFFLINE - null
zthiagobr2014 - ONLINE - null
weslem_wrs - OFFLINE - Eu que fui o errado de se abrir com uma pessoa que n merecia o meu amor
cassador_link - OFFLINE - ➡MEU CANAL: https://www.youtube.com/channel/UCaojMeShbCE3TZ35vjNUkHQ ➡MEU TWITTER: https://twitter.com/CanalDuLuann ➡MEU FACE: https://www.facebook.com/CanalDuLuann/
gutinho13mv - OFFLINE - Com os BRODI vamo longe!
facebook:joy.damasceno - ONLINE - Não duro muito tempo namorando, unica coisa que segura a mulher.. é O bêbê
pluginstaus - OFFLINE - null
live:josiel_souza00 - OFFLINE - null
yspider.gamer123 - AWAY - ΜƗŦØ ĐØ ƤVƤ
live:igoradson123 - OFFLINE - NET INSOLENTE ;-;
karl.kerber1 - AWAY - http://www.flappyplane.net/
claudio.augusto98 - OFFLINE - null
breno.macedo123 - AWAY - CRIEI NOVO SKYPE NAO VOU MAIS USAR ESSE!!!
jincagamer1 - BUSY - Entao Tem veneno... Entao EU QUERO
jvgamer45 - OFFLINE - Nai Sei .-.
facebook:guilhermesou2014 - OFFLINE - null
live:moisestking - BUSY - <3 ana ▄︻┳═一 ℊнഠรт∑ /Ƭષg ℓ¡Բ૯
joao.victor7061 - ONLINE - http://snsites.net/forum/index.php - Forum bora la
lork.prv - OFFLINE - null
live:paulo.pepele - OFFLINE - null
slownerfx - AWAY - Pedidos ON :)
xxananiasxx2012 - AWAY - Acessem: http://gamersboard.com.br
niickfernandes - AWAY - Se sua estrela não brilhou não tente tirar o brilho da minha <3 ;)
sr-mateus - AWAY - Posso ser quem você não gosta, mas não finjo ser quem eu não sou.
sparzinn - OFFLINE - null
davirssoares - OFFLINE - null

Well, except that some users are still null (Example: my contact on that account has "null" as the mood, but I have an mood and this user has me on Skype).

delthas commented 8 years ago

I'm not sure I can do any better. Sometimes Skype can't fetch friends' moods either, when you haven't seen them online in a long time. Still, normally there should be as many non-null moods as when you try with Skype4J. If that's the case, you can close the issue.

MrPowerGamerBR commented 8 years ago

@Delthas same issue in Skype4J, so I will close this issue because this is a Skype API issue, not a JavaSkype issue.

Anyway, thanks for fixing moods (and indirectly fixing my other issue :stuck_out_tongue: ), at least now there is two Skype APIs for Java where moods are working. (the rest of the APIs have broken moods)