Bug 2141 - (int-90801) Allow setting priority in Jabber/GTalk
(int-90801)
: Allow setting priority in Jabber/GTalk
Status: RESOLVED WONTFIX
Product: Chat & Call & SMS
Presence
: 5.0/(1.2009.41-10)
: All Maemo
: Low enhancement with 19 votes (vote)
: ---
Assigned To: rtcomm@maemo.org
: presence-bugs
: http://bugs.freedesktop.org/show_bug....
: community-diablo, patch
:
:
  Show dependency tree
 
Reported: 2007-10-20 00:49 UTC by Yury Kirienko
Modified: 2015-12-26 14:10 UTC (History)
10 users (show)

See Also:


Attachments
patch for telepathy-gabble to enable different priorities (5.65 KB, patch)
2008-08-20 01:51 UTC, Michael Krelin
Details
corrected patch (6.32 KB, patch)
2008-08-20 12:42 UTC, Michael Krelin
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Yury Kirienko (reporter) 2007-10-20 00:49:22 UTC
EXPECTED OUTCOME: ability to set priority

ACTUAL OUTCOME: no a word concerning priority, not any!

STEPS TO REPRODUCE THE PROBLEM: try to change jabber priority

OTHER COMMENTS:
Priority is one of the most important features in jabber — it's the other side
of the "multiple connections" feature. IMHO. (At least, personally I use it
daily.) It's much more important than status message (that can't be changed as
well).
Comment 1 Jason Carter 2007-10-20 23:54:45 UTC
In ten years of using Jabber, I haven't even once changed the priority. I don't
even see why it's needed since a message received goes to all connected clients
anyways. I assume it's left out for simplicity's sake.

I've filed a previous bug for allowing status messages to be changed while
online. Bug 1675.
Comment 2 James Cole 2008-03-02 17:44:12 UTC
I completely agree that the IM client needs to set the priority to something
other than 0.  
When you connect to the same jabber account from multiple "resources (locations
/ clients)", the priority determines which client gets new messages.  The other
client I use is Pidgin which has a resource priority of 1 when active, and 0
when away...  I wish they would let you edit the resources manually, but even
if they don't, anything is better than 0 all the time.  The maemo chat client
will never receive IMs when there are multiple clients involved unless all the
other ones are already set to 0 and the maemo client is the last to connect.
Please, set the "online" and "invisible" statuses to send a presence priority.

The real root of the problem is that there is no standardization for
resource/status priority numbers, so every client does it differently. 
(Apparently gtalk/gmail uses 24 for away priority so it often takes precedence
over someone actually online with another client).  The priority numbers should
be standardized, but since they aren't, at least let us configure them with
gconf and set them to a default of 1 for online and 0 for away.
Comment 3 Jussi Kukkonen 2008-03-02 19:07:02 UTC
*** Bug 2798 has been marked as a duplicate of this bug. ***
Comment 4 Jussi Kukkonen 2008-03-02 19:07:25 UTC
*** This bug has been confirmed by popular vote. ***
Comment 5 Jussi Kukkonen 2008-03-02 19:33:50 UTC
(In reply to comment #1)
> I don't even see why it's needed since a message received goes to all 
> connected clients anyways. 

You are wrong. See http://www.xmpp.org/rfcs/rfc3921.html#rules:
  "For message stanzas, the server SHOULD deliver the stanza to the 
   highest-priority available resource..."
The jabber servers I use do respect the spec in this regard, only highest 
priority clients will receive the message. 

I have several devices with jabber clients and priority support would make 
life so much easier. I'm including my thoughts from the duplicate here:
---
Example situation: user has laptop, tablet and phone. he would like their
priorities to be in this order, from high to low:
 * laptop available
 * tablet available
 * phone available
 * laptop away
 * tablet away
 * phone away
This would be trivial to setup if the applications allowed changing  priorities
(see Psi for an example), but just hard-coded settings (see Pidgin for an
example) would be fine too if chosen wisely.
Comment 6 Michael Krelin 2008-08-16 23:47:10 UTC
Meanwhile, the following works for me:

gconftool-2 -s /apps/telepathy/mc/accounts/jabber0/param-priority -t int
<priority-value>
Comment 7 Michael Krelin 2008-08-20 01:51:50 UTC
Created an attachment (id=895) [details]
patch for telepathy-gabble to enable different priorities

Here is the patch I've just hacked up to introduce
param-priority-{available,away} against telepathy-gabble tarball as seen here -
http://repository.maemo.org/pool/maemo4.1/free/t/telepathy-gabble/

As I have no idea where are the sources for accounts control panel applet,
there is no user interface to control the parameters, besides configuration
editor.

And since I have no more idea of where upstream lives I'm leaving it up to
interested parties to submit patch upstream.
Comment 8 Alberto Mardegan 2008-08-20 11:45:28 UTC
(In reply to comment #7)
> Created an attachment (id=895) [details] [details]
> patch for telepathy-gabble to enable different priorities

You are missing the "break"s in the get_properties() function.

> Here is the patch I've just hacked up to introduce
> param-priority-{available,away} against telepathy-gabble tarball as seen here -
> http://repository.maemo.org/pool/maemo4.1/free/t/telepathy-gabble/

You can submit the patch to the upstream, using bugs.freedesktop.org (but I
already did: https://bugs.freedesktop.org/show_bug.cgi?id=17219 )

> As I have no idea where are the sources for accounts control panel applet,
> there is no user interface to control the parameters, besides configuration
> editor.

You can also use the mc-account command-line tool; the accounts control panel
applet is closed-source, unfortunately.
Comment 9 Michael Krelin 2008-08-20 12:26:28 UTC
> (In reply to comment #7)
> > Created an attachment (id=895) [details] [details] [details]
> > patch for telepathy-gabble to enable different priorities
> 
> You are missing the "break"s in the get_properties() function.

Oops, thanks, it's been late and I haven't yet set up a comfortable environment
for maemo development (I've only got N810 3 days ago or so).

> > Here is the patch I've just hacked up to introduce
> > param-priority-{available,away} against telepathy-gabble tarball as seen here -
> > http://repository.maemo.org/pool/maemo4.1/free/t/telepathy-gabble/
> 
> You can submit the patch to the upstream, using bugs.freedesktop.org (but I
> already did: https://bugs.freedesktop.org/show_bug.cgi?id=17219 )

Thanks for the pointer, I think I'll attach the patch once I fix the switch
later today to both bugs.

> > As I have no idea where are the sources for accounts control panel applet,
> > there is no user interface to control the parameters, besides configuration
> > editor.
> 
> You can also use the mc-account command-line tool; the accounts control panel
> applet is closed-source, unfortunately.
> 

Ah, that's why I couldn't find it anywhere. Good that I haven't spent too much
time trying to ;-) Well, I personally, can live with gconf editor (or whatever
it is called in maemo), thought it would be nice to improve other users
experience... But well, I've done what I could.
Comment 10 Michael Krelin 2008-08-20 12:42:46 UTC
Created an attachment (id=896) [details]
corrected patch

I couldn't sleep well at work, knowing there's a patch with missing breaks
available in my name ;-) So, here is the fixed one.
Comment 11 Andre Klapper maemo.org 2009-02-13 02:59:16 UTC
...so according to the upstream ticket it's supported in telepathy-gabble, but
not in the Maemo UI.
Comment 12 Lucas Maneos 2009-10-22 07:56:33 UTC
Marking patches of interest to Diablo (Maemo4) community updates, please excuse
the noise.
Comment 13 Will Thompson 2009-10-22 13:08:32 UTC
I've left some comments on the upstream bug at
<http://bugs.freedesktop.org/show_bug.cgi?id=17219>.
Comment 14 Andre Klapper maemo.org 2009-10-22 20:43:11 UTC
This WILL NOT be fixed for Maemo5/Fremantle.
Keeping it open for Maemo6/Harmattan.
Comment 15 Yves-Alexis 2009-12-21 00:29:12 UTC
(In reply to comment #6)
> Meanwhile, the following works for me:
> 
> gconftool-2 -s /apps/telepathy/mc/accounts/jabber0/param-priority -t int
> <priority-value>
> 

There is no /apps/telepathy in Maemo 5 so I'm not sure it'll work that way.
What would be the workaround for Maemo5 (since it won't be fixed for
Fremantle).
Comment 16 Will Thompson 2009-12-21 00:44:50 UTC
Get mc-tool:

  # apt-get install libmissioncontrol-utils

Find out what MC calls the account you want to tweak with `mc-tool list`, which
will produce something like this:

    $ mc-tool list
    ring/tel/ring
    gabble/jabber/will_2ethompson_40collabora_2eco_2euk0
    gabble/jabber/another-jabber-account
    sofiasip/sip/blahblahblah
    ...

Now set the priority to 1337:

    $ mc-tool update gabble/jabber/will_2ethompson_40collabora_2eco_2euk0
              int:priority=1337

Next time you connect, the priority for that account will be 1337.

Note that due to an implementation detail of the account UI, if you
subsequently edit the account in the UI, the priority setting will be lost.
Comment 17 Yves-Alexis 2009-12-21 09:35:45 UTC
(In reply to comment #16)

>     $ mc-tool update gabble/jabber/will_2ethompson_40collabora_2eco_2euk0
>               int:priority=1337
> 

Thanks, works pretty fine. Idea for when this will be implemented in the UI:
allow priority to change wether the account is online/away/busy etc.

Cheers,
Comment 18 Mikhail Zabaluev nokia 2009-12-21 16:01:28 UTC
(In reply to comment #17)
> Thanks, works pretty fine. Idea for when this will be implemented in the UI:
> allow priority to change wether the account is online/away/busy etc.

I like this idea. We should move it to the brainstorming pages, since the
internal bug is closed as WONTFIX anyway.
Comment 19 John Sullivan 2010-11-21 00:09:25 UTC
Note that the maximum priority value allowed by the protocol is 127. So I
wouldn't go setting it to 1337.
Comment 20 Andre Klapper maemo.org 2011-01-17 21:32:16 UTC
Internal bug is closed as WONTFIX for Maemo5 - reflecting state here.

MeeGo Handset is where the unstable development is taking place. If you are a
developer (not a "normal" user) feedback about / retesting on MeeGo Handset
issues is specially welcome, e.g. via the MeeGo bugtracker at
https://bugs.meego.com.
Please note that MeeGo for the Nokia N900 is unstable and by no means ready for
end-users. See http://wiki.meego.com/ARM/N900 for more information and be aware
of the risks of trying unstable software.
Comment 21 Pali Rohár 2015-04-05 10:35:47 UTC
Proper fix for Google Talk (jabber) accounts for Maemo 5 is in CSSU-Devel
repository. It adds new settings option in Accounts UI settings dialog. For
testing see: http://talk.maemo.org/showthread.php?p=1465798#post1465798
Comment 22 Pali Rohár 2015-12-26 14:10:19 UTC
And fix for normal Jabber (non Google Talk) accounts is there too, see:
http://talk.maemo.org/showthread.php?p=1492687#post1492687