mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 10:19:41 +02:00
Use Jid (and subclasses) from jxmpp-jid
Fixes SMACK-634
This commit is contained in:
parent
0ee2d9ed1e
commit
5bb4727c57
180 changed files with 1510 additions and 1032 deletions
|
@ -23,7 +23,7 @@ import org.jivesoftware.smack.XMPPConnection;
|
|||
import org.jivesoftware.smack.debugger.SmackDebugger;
|
||||
import org.jivesoftware.smack.util.ObservableReader;
|
||||
import org.jivesoftware.smack.util.ObservableWriter;
|
||||
import org.jxmpp.util.XmppStringUtils;
|
||||
import org.jxmpp.jid.FullJid;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -93,18 +93,9 @@ public class SLF4JSmackDebugger implements SmackDebugger {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void userHasLogged(String user) {
|
||||
public void userHasLogged(FullJid user) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
String userTitle = getUserTitle(user);
|
||||
logger.debug("({}) User logged in {}", connection.hashCode(), userTitle);
|
||||
}
|
||||
}
|
||||
|
||||
private String getUserTitle(String user) {
|
||||
if (("@" + connection.getServiceName()).equals(XmppStringUtils.parseBareJid(user))) {
|
||||
return "<Anonymous>@" + connection.getServiceName();
|
||||
} else {
|
||||
return user;
|
||||
logger.debug("({}) User logged in {}", connection.hashCode(), user.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue