From 61bdc6f28c217b7acf9ff6386148087646c29547 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 10 Dec 2016 11:47:24 +0100 Subject: [PATCH] Fix MessageEventNotificationListener --- .../smackx/xevent/MessageEventManager.java | 2 +- .../xevent/MessageEventNotificationListener.java | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventManager.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventManager.java index d461175f4..b8fd3d737 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventManager.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventManager.java @@ -194,7 +194,7 @@ public final class MessageEventManager extends Manager { Method method = MessageEventNotificationListener.class.getDeclaredMethod( methodName, - new Class[] { String.class, String.class }); + new Class[] { Jid.class, String.class }); for (MessageEventNotificationListener listener : messageEventNotificationListeners) { method.invoke(listener, new Object[] { from, packetID }); } diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventNotificationListener.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventNotificationListener.java index e693a1c2e..fa9cd35bc 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventNotificationListener.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventNotificationListener.java @@ -17,6 +17,8 @@ package org.jivesoftware.smackx.xevent; +import org.jxmpp.jid.Jid; + /** * * A listener that is fired anytime a message event notification is received. @@ -33,7 +35,7 @@ public interface MessageEventNotificationListener { * @param from the user that sent the notification. * @param packetID the id of the message that was sent. */ - public void deliveredNotification(String from, String packetID); + public void deliveredNotification(Jid from, String packetID); /** * Called when a notification of message displayed is received. @@ -41,7 +43,7 @@ public interface MessageEventNotificationListener { * @param from the user that sent the notification. * @param packetID the id of the message that was sent. */ - public void displayedNotification(String from, String packetID); + public void displayedNotification(Jid from, String packetID); /** * Called when a notification that the receiver of the message is composing a reply is @@ -50,7 +52,7 @@ public interface MessageEventNotificationListener { * @param from the user that sent the notification. * @param packetID the id of the message that was sent. */ - public void composingNotification(String from, String packetID); + public void composingNotification(Jid from, String packetID); /** * Called when a notification that the receiver of the message is offline is received. @@ -58,7 +60,7 @@ public interface MessageEventNotificationListener { * @param from the user that sent the notification. * @param packetID the id of the message that was sent. */ - public void offlineNotification(String from, String packetID); + public void offlineNotification(Jid from, String packetID); /** * Called when a notification that the receiver of the message cancelled the reply @@ -67,5 +69,5 @@ public interface MessageEventNotificationListener { * @param from the user that sent the notification. * @param packetID the id of the message that was sent. */ - public void cancelledNotification(String from, String packetID); + public void cancelledNotification(Jid from, String packetID); }