Bug 274175 - Kopete does not remember manually given nick-names
Summary: Kopete does not remember manually given nick-names
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 1.0.80
Platform: openSUSE Linux
: NOR major
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-26 10:18 UTC by H.H.
Modified: 2012-01-12 22:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.H. 2011-05-26 10:18:49 UTC
Version:           1.0.80 (using KDE 4.6.3) 
OS:                Linux

For some protocols, for example facebook via xmmp, each time I connect, the manually given nickname is overwritten by the nickname from the protocol.

Reproducible: Always




OS: Linux (x86_64) release 2.6.37.1-1.2-desktop
Compiler: gcc
Comment 1 Julien Lorentz 2011-09-26 15:03:45 UTC
The same for me with 1.0.80 under KDE 4.6.5 and Mageia Linux.
Comment 2 H.H. 2011-09-26 18:54:34 UTC
I think I found the problem in kopete/protocols/jabber/jabberbasecontact.cpp line 109:


	// The myself contact is not in the roster on server, ignore this code
	// because the myself MetaContact displayname become the latest 
	// Jabber acccount jid.
	if( metaContact() != Kopete::ContactList::self()->myself() )
	{
		// only update the alias if it is not empty
                if ( !item.name().isEmpty () && item.name() != item.jid().bare()
			&& metaContact()->customDisplayName() != item.name () )
		{
			kDebug ( JABBER_DEBUG_GLOBAL ) << "setting display name of " << contactId () << " to " << item.name();
			metaContact()->setDisplayName ( item.name () );
		}
	}

I fixed it for me by changing to


	// The myself contact is not in the roster on server, ignore this code
	// because the myself MetaContact displayname become the latest 
	// Jabber acccount jid.
	if( metaContact() != Kopete::ContactList::self()->myself() )
	{
		// only update the alias if it is not empty
                if ( false && !item.name().isEmpty () && item.name() != item.jid().bare()
			&& metaContact()->customDisplayName() != item.name () )
		{
			kDebug ( JABBER_DEBUG_GLOBAL ) << "setting display name of " << contactId () << " to " << item.name();
			metaContact()->setDisplayName ( item.name () );
		}
	}

Would be nice, if the author of the code could have a look if this code is really needed.
Comment 3 Pali Rohár 2011-09-28 15:54:23 UTC
I think this is not problem in jabber protocol plugin in kopete but in jabber server which you are using. If server send display name of myself contact kopete will use this name.

So this sound like your jabber server does not support changing display name and has some "default" name stored on server. So when you are loged, server sent display name. If you tried to change it refuse it or does not support it (and kopete thinks that display name was changed correctly). And because it was not changed on server after next login server send "old" display name.

Your code change fully disable support for getting display name from server, so we do not want this change in Kopete...
Comment 4 H.H. 2011-09-28 16:10:32 UTC
Mhm, I don't know the jabber protocol. But I talk about facebook-jabber server (which are using a LOT of people I think).

The problem is getting even worse, because I have meta-contacts with multiple protocols (ICQ, Jabber, MSN,..), which are also renamed to the name of the facebook-contact. 

I don't think, that ANY protocol should change my custom meta-contacts.

And I also think, that no other kopete protocol does this.

Isn't there a "contact display name" which the jabber protocol may change? Has it to be the meta-contact's display name?
Comment 5 Pali Rohár 2011-09-28 16:31:04 UTC
As I know in jabber protocol for each contact you can store display name (on server, but only if server support it). Also for each kopete metacontact you can specify display name (in metacontact settings): custom name, from kaddressbook or from protocol if it support. Try to change display name to custom (and enter your own).

This server side display name is supported by ICQ plugin too, but not in WLM (MSN) plugin.
Comment 6 H.H. 2011-09-28 21:49:07 UTC
> Try to change display name to custom (and enter your own).

thats what I did, and thats the problem: it is overwritten via jabber protocol after next login. With my "patch" applied, my custom display names remain, and that's how it should be.
Comment 7 Julien Lorentz 2011-09-28 22:12:10 UTC
Exactly.
We should be able
* to choose to keep server's name from protocol
* or to use a custom name (which doesn't work with Facebook chat)
and then why not an option to check if we want the custom name to be propagated on the servers (which apparently won't be possible on Facebook, because of server's properties).
Comment 8 Julien Lorentz 2012-01-12 19:31:45 UTC
Resolved???
Comment 9 H.H. 2012-01-12 22:21:59 UTC
I submitted my patch to trunk (maybe thats for kde-4.9). if it works ok for all, I would like to submit it also for the 4.8-branch (for 4.8.1)