Commit 68b57843 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[JM-761] [JM-769] [JM-770] Misc fixes for legacy status.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4644 b35dd754-fafc-0310-a699-88a17e54d16e
parent 9360b7f2
...@@ -69,7 +69,6 @@ public class MSNSession extends TransportSession { ...@@ -69,7 +69,6 @@ public class MSNSession extends TransportSession {
p.setFrom(getTransport().getJID()); p.setFrom(getTransport().getJID());
getTransport().sendPacket(p); getTransport().sendPacket(p);
msnManager.setStatus(ContactStatus.ONLINE);
msnManager.setPrivacyMode(true); msnManager.setPrivacyMode(true);
msnManager.setReverseListBehaviour(true); msnManager.setReverseListBehaviour(true);
} }
......
...@@ -66,6 +66,8 @@ public class OSCARSession extends TransportSession { ...@@ -66,6 +66,8 @@ public class OSCARSession extends TransportSession {
private BOSConnection bosConn = null; private BOSConnection bosConn = null;
private Set services = new HashSet(); private Set services = new HashSet();
private Boolean loggedIn = false; private Boolean loggedIn = false;
private PresenceType presenceType = null;
private String verboseStatus = null;
/** /**
* The Screenname, Password, and JID associated with this session. * The Screenname, Password, and JID associated with this session.
...@@ -94,7 +96,8 @@ public class OSCARSession extends TransportSession { ...@@ -94,7 +96,8 @@ public class OSCARSession extends TransportSession {
p.setFrom(getTransport().getJID()); p.setFrom(getTransport().getJID());
getTransport().sendPacket(p); getTransport().sendPacket(p);
updateStatus(presenceType, verboseStatus); this.presenceType = presenceType;
this.verboseStatus = verboseStatus;
} else { } else {
Log.warn(this.jid + " is already logged in"); Log.warn(this.jid + " is already logged in");
} }
...@@ -267,6 +270,8 @@ public class OSCARSession extends TransportSession { ...@@ -267,6 +270,8 @@ public class OSCARSession extends TransportSession {
catch (UserNotFoundException e) { catch (UserNotFoundException e) {
Log.error("Unable to sync oscar contact list for " + getJID()); Log.error("Unable to sync oscar contact list for " + getJID());
} }
updateStatus(this.presenceType, this.verboseStatus);
} }
/** /**
...@@ -290,8 +295,11 @@ public class OSCARSession extends TransportSession { ...@@ -290,8 +295,11 @@ public class OSCARSession extends TransportSession {
request(new SetInfoCmd(new InfoData(awayMsg))); request(new SetInfoCmd(new InfoData(awayMsg)));
} }
else { else {
request(new SetInfoCmd(new InfoData(""))); request(new SetInfoCmd(new InfoData(InfoData.NOT_AWAY)));
} }
this.presenceType = presenceType;
this.verboseStatus = verboseStatus;
} }
} }
...@@ -72,6 +72,16 @@ public class YahooSession extends TransportSession { ...@@ -72,6 +72,16 @@ public class YahooSession extends TransportSession {
*/ */
private final Session yahooSession; private final Session yahooSession;
/**
* Stored Last Presence Type
*/
public PresenceType presenceType = null;
/**
* Stored Last Verbose Status
*/
public String verboseStatus = null;
/** /**
* Log in to Yahoo. * Log in to Yahoo.
* *
...@@ -79,6 +89,8 @@ public class YahooSession extends TransportSession { ...@@ -79,6 +89,8 @@ public class YahooSession extends TransportSession {
* @param verboseStatus Long representation of status. * @param verboseStatus Long representation of status.
*/ */
public void logIn(PresenceType presenceType, String verboseStatus) { public void logIn(PresenceType presenceType, String verboseStatus) {
this.presenceType = presenceType;
this.verboseStatus = verboseStatus;
final PresenceType pType = presenceType; final PresenceType pType = presenceType;
if (!isLoggedIn() && !loggingIn && loginAttempts <= 3) { if (!isLoggedIn() && !loggingIn && loginAttempts <= 3) {
loggingIn = true; loggingIn = true;
...@@ -228,6 +240,8 @@ public class YahooSession extends TransportSession { ...@@ -228,6 +240,8 @@ public class YahooSession extends TransportSession {
catch (Exception e) { catch (Exception e) {
Log.error("Unable to set Yahoo Status:", e); Log.error("Unable to set Yahoo Status:", e);
} }
this.presenceType = presenceType;
this.verboseStatus = verboseStatus;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment