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

[GATE-144] Catching winks and nudges and sending a headline notification.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@7277 b35dd754-fafc-0310-a699-88a17e54d16e
parent b916290d
...@@ -225,6 +225,8 @@ gateway.msn.passwordincorrect=The password you registered with is incorrect. Pl ...@@ -225,6 +225,8 @@ gateway.msn.passwordincorrect=The password you registered with is incorrect. Pl
gateway.msn.sendmsgfailed=Unable to send MSN message. Reason: gateway.msn.sendmsgfailed=Unable to send MSN message. Reason:
gateway.msn.illegalaccount=You are registered with the MSN transport with an illegal account name.\nThe account name should look like an email address.\nYou registered as: gateway.msn.illegalaccount=You are registered with the MSN transport with an illegal account name.\nThe account name should look like an email address.\nYou registered as:
gateway.msn.disconnect=You were disconnected from the MSN service. gateway.msn.disconnect=You were disconnected from the MSN service.
gateway.msn.wink=You have received an MSN wink.
gateway.msn.nudge=You have received an MSN nudge.
# Yahoo Transport # Yahoo Transport
gateway.yahoo.shortservice=Yahoo gateway.yahoo.shortservice=Yahoo
......
...@@ -151,3 +151,5 @@ gateway.sip.passwordincorrect=The password you registered with is incorrect. Pl ...@@ -151,3 +151,5 @@ gateway.sip.passwordincorrect=The password you registered with is incorrect. Pl
gateway.sip.sendmsgfailed=Unable to send SIMPLE message. Reason: gateway.sip.sendmsgfailed=Unable to send SIMPLE message. Reason:
gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with an illegal account name.\nThe account name should look like an email address.\nYou registered as: gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with an illegal account name.\nThe account name should look like an email address.\nYou registered as:
gateway.msn.disconnect=You were disconnected from the MSN service. gateway.msn.disconnect=You were disconnected from the MSN service.
gateway.msn.wink=You have received an MSN wink.
gateway.msn.nudge=You have received an MSN nudge.
\ No newline at end of file
...@@ -151,3 +151,5 @@ gateway.sip.passwordincorrect=The password you registered with is incorrect. Pl ...@@ -151,3 +151,5 @@ gateway.sip.passwordincorrect=The password you registered with is incorrect. Pl
gateway.sip.sendmsgfailed=Unable to send SIMPLE message. Reason: gateway.sip.sendmsgfailed=Unable to send SIMPLE message. Reason:
gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with an illegal account name.\nThe account name should look like an email address.\nYou registered as: gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with an illegal account name.\nThe account name should look like an email address.\nYou registered as:
gateway.msn.disconnect=You were disconnected from the MSN service. gateway.msn.disconnect=You were disconnected from the MSN service.
gateway.msn.wink=You have received an MSN wink.
gateway.msn.nudge=You have received an MSN nudge.
\ No newline at end of file
...@@ -151,3 +151,5 @@ gateway.sip.passwordincorrect=The password you registered with is incorrect. Pl ...@@ -151,3 +151,5 @@ gateway.sip.passwordincorrect=The password you registered with is incorrect. Pl
gateway.sip.sendmsgfailed=Unable to send SIMPLE message. Reason: gateway.sip.sendmsgfailed=Unable to send SIMPLE message. Reason:
gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with an illegal account name.\nThe account name should look like an email address.\nYou registered as: gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with an illegal account name.\nThe account name should look like an email address.\nYou registered as:
gateway.msn.disconnect=You were disconnected from the MSN service. gateway.msn.disconnect=You were disconnected from the MSN service.
gateway.msn.wink=You have received an MSN wink.
gateway.msn.nudge=You have received an MSN nudge.
\ No newline at end of file
...@@ -151,3 +151,5 @@ gateway.sip.passwordincorrect=The password you registered with is incorrect. Pl ...@@ -151,3 +151,5 @@ gateway.sip.passwordincorrect=The password you registered with is incorrect. Pl
gateway.sip.sendmsgfailed=Unable to send SIMPLE message. Reason: gateway.sip.sendmsgfailed=Unable to send SIMPLE message. Reason:
gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with an illegal account name.\nThe account name should look like an email address.\nYou registered as: gateway.sip.illegalaccount=You are registered with the SIP/SIMPLE transport with an illegal account name.\nThe account name should look like an email address.\nYou registered as:
gateway.msn.disconnect=You were disconnected from the MSN service. gateway.msn.disconnect=You were disconnected from the MSN service.
gateway.msn.wink=You have received an MSN wink.
gateway.msn.nudge=You have received an MSN nudge.
\ No newline at end of file
...@@ -84,7 +84,25 @@ public class MSNListener extends MsnAdapter { ...@@ -84,7 +84,25 @@ public class MSNListener extends MsnAdapter {
* Handles incoming datacast messages from MSN. * Handles incoming datacast messages from MSN.
*/ */
public void datacastMessageReceived(MsnSwitchboard switchboard, MsnDatacastMessage message, MsnContact friend) { public void datacastMessageReceived(MsnSwitchboard switchboard, MsnDatacastMessage message, MsnContact friend) {
Log.debug("MSN: Received datacast message to " + switchboard + " from " + friend + ": " + message); if (message.getId() == 1) {
msnSession.getTransport().sendMessage(
msnSession.getJIDWithHighestPriority(),
msnSession.getTransport().convertIDToJID(friend.getEmail().toString()),
LocaleUtils.getLocalizedString("gateway.msn.nudge", "gateway"),
Message.Type.headline
);
}
else if (message.getId() == 2) {
msnSession.getTransport().sendMessage(
msnSession.getJIDWithHighestPriority(),
msnSession.getTransport().convertIDToJID(friend.getEmail().toString()),
LocaleUtils.getLocalizedString("gateway.msn.wink", "gateway"),
Message.Type.headline
);
}
else {
Log.debug("MSN: Received unknown datacast message to " + switchboard + " from " + friend + ": " + 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