powered by Jive Software

Broadcast plugin, offline users


#1

Hello everyone,

Here I really need to ensure that all users receive broadcast messages of this plugin, and seems that only the online users are receiving.

I’ve added a contact list user all@broadcast.server , wich is always ‘online’. Seems that no property exists to make the plugin send even to offline users, like the ‘Server Message’ funcionality at Openfire console.

Any help would be really appreciated


#2

Hi,

so you want to use the “Server Message” function. The broadcast plugin group “all” sends messages only to online users. You may change the code and iterate over all users, this is a simple task for a developer.

LG


#3

Hi LG, thanks for the reply. I don’t know how to write code, but would be really useful to have a plugin property to broadcast to all (everyone) independent of staus on/off line.

Does exist another plugin that does this?


#4

Hi,

it ismuch more easy to extend the current plugin. Anyhow usually there are more offline users than online users. So one broadcast message will likely be stored for a lot of users and if they login after a month they have likely uninteresting messages.

If you create a server group with all users you should be able to do the same. Or I could upload a modified broadcast plugin which sends to all users.

LG


#5

HI LG, thanks again. I am aware that users would receive messages outdated, but this is necessary sometimes, for history purposes, etc…

Please, if possible, update the plugin to have a property allowing send even to offline users (that, on a business company, most of the times get online on the same or next day and would receive the broadcast messages)

Thank you LG!


#6

Hi,

this should work for 3.6.4 without setting any property. Anyhow I did not test it as I already use 3.7 (beta) and there it did work fine.

LG

This is the code:

...
private UserManager userManager;
...
userManager = UserManager.getInstance();
...
userManager = null;
...
...
// old code (line 200): sessionManager.broadcast(message);
// new code to send message to all users
Collection<User> users = userManager.getUsers();
for (User u : users)
{
    Message newMessage = message.createCopy();
    newMessage.setTo(u.getUsername() + "@" + JiveGlobals.getProperty("xmpp.domain"));
    try {
        componentManager.sendPacket(this, newMessage);
    }
    catch (Exception e) {
        componentManager.getLog().error(e);
    }
}

broadcast.jar (20265 Bytes)


#7

I really thank you LG ! I will test this ASAP.

Thanks again, please keep it up.


#8

Now I’m having some problems with this.

When sending a broadcast message to all@broadcast.server, I receive on my own contact too; maybe would be better to do not receive my own message;

When sending the first message to broadcast, I receive a error that a JID was not found (?!?) and users receive message without issues; sometimes just one user doesn’t receive, but problem seems to be on client app, Psi

Could someone please help? Thanks

(Just now I’ve looked at how many views this thread has, and there are also other topics about broadcast to offline users. Could we make a request to update the official plugin? )


#9

please, someone, no news on broadcast plugin?


#10

Hi,

this can be fixed, I’ll create an issue for this: When sending a broadcast message to all@broadcast.server, I receive on my own contact too; maybe would be better to do not receive my own message;

When sending the first message to broadcast, I receive a error that a JID was not found (?!?) and users receive message without issues;

Is this always the same JID? Where do you get this error message (client / server log)?

  • “sometimes just one user doesn’t receive, but problem seems to be on client app, Psi*” - Also Spark had (or still has) a problem receiving offline messages during startup. Anyhow this simple code excludes server side logging so it’s hard to tell what’s going on. I hope that Openfire 3.7 will be released soon so one can use log4j for more detailed logs.

LG


#11

another feature that would be very nice would be the option to automatically include a word like “Everyone:” on the beginning of the broadcast message. It’s frequent that users would like to distinguish when a message is for everyone or not.

cheers


#12

Hi,

a prepend string may also be very easy to add. Anyhow I don’t see the need - you will likely not broadcast to “all” too often and broadcasts to groups should likely not include “Everyone:”. A client should be able to display the sender of the message.

LG

PS: I did create OF-380


#13

Hi LG ,

In some scenarios I’ve found that a prepend string, configurable on plugin properties, would be really useful. I have many users asking for this, as bosses get used to broadcast chat messages to everyone, and employes would like to set priorities/replies accordingly. The way it is now, a message have no ID of being a broadcast or not.

Some examples of a prepend string would be Attention, Everyone, Broadcast, etc.

Thanks for the reply and for creating the OF-380! also, broadcasting to offline users is going fine, as they keep track of what is happening in their absence .


#14

Hi,

wait for Openfire 3.7.0, there OF-127 is implemented. Seems that I did commit this to trunk some months ago.

LG


#15

I thank you again, LG


#16

hi,

OF-127 would be a really useful feature, but it seems like setting “plugin.broadcast.messagePrefix” property doesn’t work with 3.0.7 beta

(i use the latest “Broadcast 1.7.0” plugin)


#17

Hi,

the plugins are still 3.6.4 plugins as there is no 3.7.0-beta plugins page. I’m looking into this as this seems to affect all plugins.

LG

Update: Should be fixed within two weeks, when WEB-13 is solved.


#18

Thanks for replying, LG!

I’ve been visiting “beta-plugins” page several times - hoping that betas for “native” openfire plugins would also be there - with no luck. So, i’ll wait for update.