mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-10-29 19:57:28 +00:00
ContactList hide error when trying to get last activity from a server that doesn't support it yet
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
This commit is contained in:
parent
50c54bf6c7
commit
c2e504e6fa
@ -31,7 +31,9 @@ import javax.swing.JWindow;
|
||||
|
||||
import org.jivesoftware.resource.Res;
|
||||
import org.jivesoftware.resource.SparkRes;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
import org.jivesoftware.smack.packet.StanzaError.Condition;
|
||||
import org.jivesoftware.smackx.vcardtemp.packet.VCard;
|
||||
import org.jivesoftware.smackx.iqlast.packet.LastActivity;
|
||||
import org.jivesoftware.smackx.iqlast.LastActivityManager;
|
||||
@ -261,9 +263,14 @@ public class ContactInfoWindow extends JPanel {
|
||||
status += Res.getString("message.idle.for", time);
|
||||
}
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
Log.warning( "Unable to get Last Activity from: " + contactItem.toString(), e1 );
|
||||
}
|
||||
} catch (XMPPException.XMPPErrorException e) {
|
||||
Condition condition = e.getStanzaError().getCondition();
|
||||
if (condition != Condition.feature_not_implemented) {
|
||||
Log.warning("Unable to get Last Activity from: " + contactItem, e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.warning("Unable to get Last Activity from: " + contactItem, e);
|
||||
}
|
||||
}
|
||||
statusLabel.setText(status);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user