add own JID to roster

Bug #560781 reported by buzzdee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Coccinella
Won't Fix
Wishlist
buzzdee

Bug Description

I can add the own JID to the roster, but that confuses coccinella a bit.
as pointed out in bug report #507360,

RFC3921bis says a user should not been allowed to add himself to the roster

I have a bug open with ejabberd:
https://support.process-one.net/browse/EJAB-1166

I propose to do the following:
when someone tries to add the own JID to the roster, then coccinella could intercept, (can be matching with myjid in the code), and actually not add the own jid to the roster, but just "show" the own jid in the roster.
This would needed to be added when using the "Add Contact" Window, and also in the User Search.
When removing the own jid from the roster afterwards, then this should also be handled specially.

TKabber has a configuration option to show the own JID in the roster, but doing it as proposed above would eliminate the need of an addiitional configuration option. Adding and removing the own JID to the roster view would be fully transparent to the user.

Sander, any objections about this one?

Revision history for this message
sander (s-devrieze) wrote :

Sounds like a great solution as it avoids adding an additional configuration option whilst keeping transparency.

buzzdee (sebastia)
Changed in coccinella:
status: New → In Progress
importance: Undecided → Wishlist
assignee: nobody → buzzdee (sebastia)
Revision history for this message
buzzdee (sebastia) wrote :

appended patch detects when the own jid is added or removed from the roster.

It still needs to be displayed in the roster.

Revision history for this message
sander (s-devrieze) wrote :

I think you forgot to type an $ sign in your patch:

invalid bareword "isownjid"
in expression "isownjid";
should be "$isownjid" or "{isownjid}" or "isownjid(...)" or ...
invalid bareword "isownjid"
in expression "isownjid";
should be "$isownjid" or "{isownjid}" or "isownjid(...)" or ...
    (parsing expression "isownjid")
    invoked from within
"if {isownjid} {
 if {!$jprefs(rost,showOwnJID)} {
     return
 }
    }"
    (procedure "::RosterTree::CreateItemBase" line 11)

buzzdee (sebastia)
Changed in coccinella:
milestone: 0.96.20 → 0.96.22
Revision history for this message
buzzdee (sebastia) wrote :

fixed the bug in the patch, and rewored the remove jid stuff, and added a exception when adding the own jid

Revision history for this message
buzzdee (sebastia) wrote :

fixed patch again, and now own jid is shown in the roster too, still needs some cleanup and proper testing...

Revision history for this message
buzzdee (sebastia) wrote :

now correctly adds/removes the own jid from the roster. Also when there are multiple users marked for removal, the own jid is detected.

Its only still cluttered with debug output informations.

There may be some "little" things to discuss:
 * right now it adds the own JID in a group called MySelf
   * could be a different name, and made translatable
 * This group is just sorted alphabetically in the roster amongst the others
   * when involving the roster themes, it could be made to always show up on top or the like...
 * the user is not prevented to be edited
   * any changes done to the user are not propagated, i.e. putting the user into different groups, or changing the nick
 * the user can be dragged and dropped into other groups, but also here, the changes are not actually done

Revision history for this message
buzzdee (sebastia) wrote :

argh, after all that working on that, I just read the last version of the http://tools.ietf.org/html/draft-ietf-xmpp-3921bis-20#section-2.3.3 at the end of this section the following:

Interoperability Note: Some servers return a <not-allowed/> stanza
      error to the client if the value of the <item/> element's 'jid'
      attribute matches the bare JID <localpart@domainpart> of the
      user's account.

So I'll ask on <email address hidden> whether its now just OK to assume that servers that will comply with rfc3921bis will allow adding the own jid to the roster.

Revision history for this message
buzzdee (sebastia) wrote :

I'll close this one, since it seems now to be fine that a server saves the own jid of the user to the roster.
This makes live easier for me/us, since nothing needs to be changed in coccinella.
It will just not work with some of the servers, so the feature may not be available for everyone.

Changed in coccinella:
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.