Feature Request: Send message to all resources

Message carbons directly addresses the use case being discussed, which Google seems to do by default (without regard to that spec). Openfire can certainly look at implementing it, but it is not likely to satisfy the needs of many people who have asked for this feature until more clients actually implement it.

The spec requires compliance on both the server and client, but it is unlikely that any clients in broad use today currently support this spec as it has not even reached draft status yet.

The other option would be to create a proprietary server side behaviour to simply broadcast messages to all connected users with the same bare JID. I think it would be best to implement this options as a plugin, so it is not in the base code where it would make things more confusing when the Message Carbons spec is supported.

1 Like

Yes, I agree that message carbons is the right way to implement it as a separate plugin. Though, rcollier is correct that it should be supported by the server as well as the client. At the moment there are not so many clients that support it.

As for the option of broadcasting all incoming messages to all connections sharing same bare JID, I think it should be implemented as a plugin (better than a patch and a server true/false option). But it should be pointed out that it’s a ‘patch’ and not the behaviour by specification.

Speaking of the plugin to broadcast messages (not XEP-0280 Message Carbons) it should be noted that it can be used for incoming messages only but not to distribute own outgoing messagse to all your devices. As for the later I think the client should support message carbons as not all of them will process plain messages correctly even if the servers sends a message to the client. It will have a different ‘from’ field from the full JID that particular resource has (it will be his own JID but with a different resource).

I’m willing to implement this patch to deliver messages to all user resources no matter whether the message was sent to bare or full JID. Though, I don’t have experience creating plugins for Openfire. If you can think of a way to implement it, please advise me. I’ll share the code with the community if I manage to do it the right way (plugin not a patch). I’m pretty sure it will be a pretty popular feature based on all the requests and questions regarding it here.

First of all i like to give my +1, like and vote for implementing XEP-0280 in openfire. Native code or as a supported plugin - you decide. More and more other xmpp server software support this feature like prosody (http://prosody.im/doc/xeplist).

So is there any known current developing going on based on XEP-0280 ?

I guess the best option would be to fully implement XEP-0280 Message Carbons. Though, as an intermediate solution it’s an option to develop a plugin to forward incoming messages to all registered resources no matter whether the message is sent to a bare of full JID.

Any suggestions? Is such a temprorary plugin needed before XEP-0280 is developed? BTW, I think it could be useful in many situations when clients do not support XEP-0280. But it violates the XMPP specification on how to deliver messages.

So is there any known current developing going on based on XEP-0280 ?

Probably not. There isn’t even a Jira ticket for it.

On top of that it is still in experimental state and there are long-standing issues which are unresolved since many years (like XEP-0079 and XEP-0198)

On the other hand it seems relatively simple to implement. I might even give it a try.

1 Like

We really need this feature (carbons), it might be a deal breaker for us.I could probably put up a small bounty if someone wnated to tackle this.

Setting route.all-resources=true should help. Do I get now a small HMS Bounty? (;

That doesn’t seem to work for us. Also its only replicates replies, it doesn’t sync the whole conversation.

No bounty for you

LG,

Have a look at http://community.igniterealtime.org/message/234438#234438

wroot explained the issue with route.all-resources really GREAT why it won’t work as ‘expected’

Ooops. One could try to modify org.jivesoftware.openfire.spi.RoutingTableImpl.java:

private boolean routeToLocalDomain(JID jid, Packet packet, boolean fromServer) {
     // TODO check logic and test things !!1!
     if (JiveGlobals.getBooleanProperty("route.to-bare-jid", false)) {
          jid = new JID(jid.toBareJID()); // legal as jid is not final .... or better create a local "jid2"? any side effects to pubsub?
     }
     // end of TODO
     boolean routed = false;
...

I’ve created OF-758.

Feel free to post your bounty at https://www.bountysource.com/teams/igniterealtime

I think other’s can join the bounty too and increase the ammount. And depending on the ammount, it’s something I would certainly consider.

I’ve implemented XEP-280 in Openfire’s trunk.

Maybe sombody has the opportunity to test and/or review.

http://fisheye.igniterealtime.org/changelog/openfire?cs=14012

1 Like

To test this we have to know a client which supports that. So, this should deliver all sent messages to all connected resources? How it is enabled on the server, or should it work automatically?

It is enabled per session (i.e. connection/resource) as described in XEP-280 (with an IQ-set).

Whenever a client sends a message, a carbon copy of the message is delivered to each other carbon-enabled resource of that user (with extension).

When a message is sent to a bare JID, the message is forked to each carbon-enabled resource of the recipient, no matter of their priority.

When a message is sent to a full JID, the message is forwarded to each other carbon-enabled resource of the recipient (with extension).

You can also send “private” messages. Those won’t be forked / forwarded.

CSH,

Thank you for taking the time to add this functionality. However after installing 3.9.2 and signing in on two machines, I’m not receiving messages on both instances. (one spark, one pidgin)

Would you mind providing some information that is human readable to non xmpp experts? When I pull up the XEP-280 draft/document on xmpp.org it says the following and provides some XML

When a client wants to participate in the Carbons protocol, it enables the protocol by sending an IQ-set containing a child element qualified by the namespace “urn:xmpp:carbons:2”:

this is clearly not helpful to the average user. If a client modification, or a specific client is required, it would be nice to have this information available.

Thanks,

Chris

Yes, you need a client with XEP-280 support. (Sorry, I don’t know of any).

You have to first enable support on that client or rather for the current XMPP session.

Thank you for the fast reply. And that sucks

Is there an open request to have this functionality added to Spark? If not am I able to open one?

-Chris

Looks like Jitsi nightlies, and conversations (android) claim XEP-280 support

https://jitsi.org/Main/Download#latestnightly

Sounds like it should be the easiest to prototype on https://github.com/candy-chat/candy

Here you go SPARK-1585 Though that won’t help much until someone steps up and provide a patch.