Commit 6d57bd66 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Modified the way to figure out if a JID belongs to an anonymous user.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3499 b35dd754-fafc-0310-a699-88a17e54d16e
parent 67bd4ce5
......@@ -44,6 +44,11 @@
Presence Plugin Changelog
</h1>
<p><b>1.1.2</b> -- March 9, 2005</p>
<ul>
<li>Now requires Wildfire 2.5.1</li>
</ul>
<p><b>1.1.1</b> -- December 15, 2005</p>
<ul>
<li>Now requires Wildfire 2.4.0</li>
......
......@@ -5,9 +5,9 @@
<name>Presence Service</name>
<description>Exposes presence information through HTTP.</description>
<author>Jive Software</author>
<version>1.1.1</version>
<date>12/15/2005</date>
<minServerVersion>2.4.0</minServerVersion>
<version>1.1.2</version>
<date>3/9/2006</date>
<minServerVersion>2.5.1</minServerVersion>
<adminconsole>
<tab id="tab-server">
......
......@@ -11,16 +11,16 @@
package org.jivesoftware.wildfire.plugin;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.wildfire.PresenceManager;
import org.jivesoftware.wildfire.XMPPServer;
import org.jivesoftware.wildfire.container.Plugin;
import org.jivesoftware.wildfire.container.PluginManager;
import org.jivesoftware.wildfire.user.User;
import org.jivesoftware.wildfire.user.UserManager;
import org.jivesoftware.wildfire.user.UserNotFoundException;
import org.jivesoftware.wildfire.user.User;
import org.jivesoftware.wildfire.PresenceManager;
import org.jivesoftware.wildfire.XMPPServer;
import org.jivesoftware.util.JiveGlobals;
import org.xmpp.packet.Presence;
import org.xmpp.packet.JID;
import org.xmpp.packet.Presence;
import java.io.File;
......@@ -102,7 +102,8 @@ public class PresencePlugin implements Plugin {
// TODO Implement this
throw new UserNotFoundException("Presence of components not supported yet!");
}
if (targetJID.getNode() == null) {
if (targetJID.getNode() == null ||
!UserManager.getInstance().isRegisteredUser(targetJID.getNode())) {
// Sender is requesting presence information of an anonymous user
throw new UserNotFoundException("Username is null");
}
......
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