Commit da912e14 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Downgraded to a "known" for msnm. Also some tweaks to improve msn messaging,...

Downgraded to a "known" for msnm.  Also some tweaks to improve msn messaging, still not done yet though.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk/src/plugins/gateway@5369 b35dd754-fafc-0310-a699-88a17e54d16e
parent 0f71a178
No preview for this file type
......@@ -5,7 +5,7 @@ commons-logging | 1.1
irclib.jar | 1.04
jml.jar | 1.0a2 (patched)
joscar.jar | 0.9.3 (patched)
msnm.jar | 2006-09-13 build
msnm.jar | 1.3
picocontainer.jar | 1.2.0
ymsg_network.jar | 0.61
ymsg_support.jar | 0.6
......@@ -11,6 +11,7 @@
package org.jivesoftware.wildfire.gateway.protocols.msn;
import org.xmpp.packet.Message;
import org.xmpp.packet.Presence;
import java.util.Date;
......@@ -61,6 +62,10 @@ public class MSNListener extends MsnAdapter {
public void loginComplete(MsnFriend me) {
msnSession.getRegistration().setLastLogin(new Date());
msnSession.setLoginStatus(true);
Presence p = new Presence();
p.setTo(msnSession.getJID());
p.setFrom(msnSession.getTransport().getJID());
msnSession.getTransport().sendPacket(p);
}
}
......@@ -24,6 +24,7 @@ import java.util.List;
import java.util.ArrayList;
import java.util.concurrent.ConcurrentHashMap;
import java.io.IOException;
import java.awt.*;
import rath.msnm.MSNMessenger;
import rath.msnm.SwitchboardSession;
......@@ -259,13 +260,16 @@ public class MSNSession extends TransportSession {
String contact = getTransport().convertJIDToID(jid);
SwitchboardSession session = msnMessenger.findSwitchboardSession(contact);
if (session == null) {
Log.debug("New session being created.");
session = new SwitchboardSession(msnMessenger, ServerInfo.getDefaultServerInfo(), contact);
session.
}
try {
MimeMessage mimeMessage = new MimeMessage();
mimeMessage.setKind(MimeMessage.KIND_MESSAGE);
mimeMessage.setMessage(message);
session.sendMessage(mimeMessage);
MimeMessage mimeMessage = new MimeMessage(message, Color.black);
mimeMessage.setKind(MimeMessage.KIND_MESSAGE);
mimeMessage.setFontName("");
// session.sendInstantMessage(mimeMessage);
msnMessenger.sendMessage(contact, mimeMessage);
}
catch (IOException e) {
Log.error("Failed to send MSN message.");
......
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