Giter Club home page Giter Club logo

Comments (5)

smokku avatar smokku commented on May 18, 2024

Could you please explain this feature request more throughly?
As this is right now, it's very fuzzy.

  • who should be able to send messages? jabberd2 itself? jabberd2 almost never originates messages by itself
  • what do you mean by "all resources"? all connected resources? all active resources? of specific user? of all users?

It would be best explained by use cases.

from jabberd2.

brianjmurrell avatar brianjmurrell commented on May 18, 2024

Bob has a computer, a tablet and a phone. They all have a jabber client running on them. Bob wants all messages sent to him from his contacts to appear on the jabber client on all devices, all of the time, regardless of priorities or other heuristics.

Currently there seems to be some algorithm that takes in to account priority and perhaps idle time, and/or the client a message response came from, but I have observed that a message received from one my contacts that "starts a new conversation" (where perhaps "conversation" is heuristically determined by idleness or some such) will go to all of my devices where the priority is the same and i have no "ongoing conversation" (again, by idleness perhaps?) but as soon as i respond to such a message (i.e. turn the receipt of a message into a conversation), any further messages only come to the device that I responded on.

I'd rather the much more simple case that all messages from all of my contacts always go to all of my clients.

from jabberd2.

smokku avatar smokku commented on May 18, 2024

By XMPP design all routing decision is configured by client. This is what priority is for.
If an user wants to receive messages on connected resources 'foo', 'bar' but not 'baz', user needs to send presence packets with equal priority (ex. 10) for both resources 'foo' and 'bar', and higher than priority on resource 'baz' (ex. 1).

If there are many resources connected with highest active priority, jabberd2 will duplicate messages sent to bare user resource, and route these messages to all resources with highest active priority.

Please keep in mind, that many Jabber clients implement a technique known as "resource latching". When beginning a conversation the initiating client sends message to bare contact JID (resource-less). But on first received reply message, the initiating client "latches" the conversation window to the resource it received response from and sends all subsequent messages directly to this resource - passing-through routing setup of the receiver.

from jabberd2.

brianjmurrell avatar brianjmurrell commented on May 18, 2024

Hrm. Interesting. I didn't know about this "resource latching" feature. It seems to describe exactly what I am seeing.

So while it seems like a generally good idea to leave the routing in the sending client, it might be that the recipient wants to override that and ultimately I think the final decision on routing belongs to the receiver, not the sender. i.e. a client should be able to ask the server to send messages to all connected resources, regardless of whether the sender sent to a specific resource or not.

I was hoping a lack of resource specified by a client, or a duplication of resource names might be a solution but some reading just revealed that JIDs must be unique.

In doing that reading though I came across a tidbit about negative priorities. Apparently the server is supposed to queue up messages for clients that have negative priorities and wait for them to reset their priority to something positive? So if all clients had a negative priority, the first one to set it's priority to something positive would get the message(s), yes?

This might be a way to ensure that the client (i.e. device) that the user uses next gets the message and it's not sent to a client (i.e. device) that will not have the user's attention for a long period of time.

from jabberd2.

brianjmurrell avatar brianjmurrell commented on May 18, 2024

Yeah, setting negative priorities on Away seems to be a workable solution to making sure messages appear where the user is paying attention.

Now to just find an android XMPP client that lets one define priorities for the Away/Available states. Unfortunately it seems Xabber is not one of them. :-(

from jabberd2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.