Broadcast plugin source code

Hi all,

I wonder if source code for broadcast login available anywhere.

My problem:

.After perform “group integration” (according to Custom Database Integration Guide), i can not broadcast message to any specific group. All groups appear ok via administration console though. I still can broadcast to all (all@broadcast.hostname).

here is my code:

Chat newChat = con.createChat(“groupName@broadcast.myHostName”);

newChat.sendMessage(“My message”);

Nothing is wrong with the code because it works before the group integration.

I would like to know how broadcast service does broadcasting to a group and if i can have the source code it would be great.

Many thanks,

Trung.

yes it is. it’'s part of wildfire, so checkout the code from:

svn co http://svn.jivesoftware.org/svn/repos/wildfire/trunk wildfire

Hi,

if you did never use SVN before you may want to download wildfire_src.gzip - these’'s also the source of all plugins included.

LG

Many thanks for all replies so far and I have got all the source code.

I have another question regarding broadcast plugin as following:

When broadcasting message to a group, broadcast plugin only broadcasts the message to non-admin members of the group (all the members that are returned from group.getMembers() call). I wonder if it is intentionally designed this way, or it is a bug.

And also there is a bug in JDBCGroupProvider.getMembers(),

if (user.indexOf(’’@’’) == -1) {

// Create JID of local user if JID does not match a component’'s JID

if (!server.matchesComponent(userJID)) {

userJID = server.createJID(user, null);

}

}

is missing in the while loop. This causes problem when client fetches roster group from server, the roster group only contains user name but not a complete JID ehich is username@address…

Regards,

Trung.

Thanks.