Priorities, Clients, and Statusi

Ok, first let me describe the situation:

User A has JabberIM client on mobile device on (assume 24/7).

User A logs into PC in the morning.

User A walks away from his pc with his phone

User B sends User A a message

User B’s message ends up on User A’s PC even though it’s status is ‘Away’

User A returns to desk 5 hours later to find a request that needed to be done 4 hours ago

is there any way that we can affect priorities with status messages? Assuming you set a priority of 10 for the pc and 5 for the mobile device, make away status a -6 on the pc so the mobile will get the message?

Please let me know if there is some other way we can do this too,

Thanks,

-ConFuzedITGuy

Jumped the gun on this a little, it seems spark takes care of this well already but miranda doesnt seem to, anyone know anything about this?

When sending a message to an bare JID (e.g. user@example.com), then the message is redirected on server side to that resource with highest priority, regardless of the client. When sending a message to an full JID (e.g user@example.com/Resource), it is send directly to that resource. Special case: If that resource does not exist (because it has gone offline), the message is dropped by the server.

=>

  • set “home” priority to 5.
  • set “mobile” priority to 6 if you are not at home
  • set “mobile” priority to 4 if you are at home

There are clients out there which have a remote control for setting priority and status. E.g. Psi is one of them. Also Psi can retrieve unread messages remotely from one resource to another. It can be controled remotely by any client that supports AdHoc-Commands.

I don’t want to manage it manually unless absolutly necessary, Spark like I found out automatically sets the priority lower when AFK and sets it back when coming back from AFK, Miranda, however, does not…

Is there a way I can modify the server to detect Miranda’s away status and bump the priority down so that another resource gets the IM?

When setting away status, you normaly can set priority at the same time…

Is there a way I can modify the server to detect Miranda’s away status
and bump the priority down so that another resource gets the IM?
I’m pretty sure this would violate the XMPP protocol.The better way would be to modify the client.

You could try to set both clients to equal priority. It does deppend on the server software what happens then. I’m not sure what openfire does.

Do you not get what I am trying to say?

And no, there is no popup asking for priority for AFK, the whole point of AFK is that you can walk away from your computer without doing anything and have it auto change to your mobile device if you have one!!!

What you are telling me is that unless we use spark exclusively we will not benefit from auto AFK status when using mobile devices? But, there has to be something somewhere that can be changed (whether it be miranda itself or the server). Well gee, if spark can manage it then you have to be able to do something in miranda, where is it then?

ah…if you call it “auto-away” everybody does know what you are talking about, sorry

Have you tried equal priorities on both clients?
RFC 3921, page 85 says:

If two or more available resources have the same priority, the server MAY use some other rule (e.g., most recent connect time, most recent activity time, or highest availability as determined by some hierarchy of values) to choose between them or MAY deliver the message to all such resources.

you have to be able to do something in miranda, where is it then?
Sorry, I’m not an Miranda developer. Maybe you should ask in some miranda forum.

Equal priorities on both resources would have the message sent to both, we would like to avoid that situation and only send to an active client. It looks like that could be done using Spark on all PCs and Slick on all mobile devices, however, if we could we would like to be able to use diverse clients on the PCs as apposed to using just spark…

ConFuzedITGuy wrote:

anyone know anything about this?

About what? Miranda? I doubt you can find much info about it here. As about Spark. The only inconvenience that i find is that i cant set priorities for default statuses. I have filed that request in JIRA system.

Ok. so how do I tell the server to send it to X client when A client is ‘busy’ besides changing prority?

ConFuzedITGuy wrote:

Equal priorities on both resources would have the message sent to both

I believe this is not right. Have just tested with two equal priority resources, and Openfire send the message to last active resource only.

As per those instructions it will go to both.

ConFuzedITGuy wrote:

Ok. so how do I tell the server to send it to X client when A client is ‘busy’ besides changing prority?

There is no easy way. You will need to change server code, or maybe a plugin can change current behavior. XMPP is based on resources and priorities and Openfire obeys XMPP standards. The only way to override priorities is to send message directly to resource - user@server/resource

ConFuzedITGuy wrote:

http://www.igniterealtime.org/community/message/167072#167072

As per those instructions it will go to both.

Didnt know about that system property before.

Have just tested with two equal priority resources, and Openfire send the message to last active resource only.
Documentation of private method org.jivesoftware.openfire.spi.RoutingTableImpl#routeToBareJID(JID,Message) says:

In the case that the user is connected from many resources the logic will be the following:

  • Select resources with highest priority
  • Select resources with highest show value (chat, available, away, xa, dnd)
  • Select resource with most recent activity
    According to the source code these rules are used top-down. However, it’s possible this method is not used, or only used in some special cases.

=> What’s the exact behavior of Openfire when priority is equal?

Didnt know about that system property before.
Why is this not documented at some popular place? Are there more of these?

(I know the properties document already)