| Summary: | Jabbe : JEP-0107: User Mood | ||
|---|---|---|---|
| Product: | [Unmaintained] kopete | Reporter: | Nicolas L. <kde> |
| Component: | Jabber Plugin | Assignee: | Kopete Developers <kopete-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | CC: | mattr, romainguinot |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Mandriva RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | proposed patch to be able to reset a jabber mood back to none | ||
|
Description
Nicolas L.
2005-08-23 01:31:53 UTC
can someone take a look at this ? ( psi have it now ) *** This bug has been confirmed by popular vote. *** resetting a user mood back to none does not work right now. Currently, in protocols/jabber/jabberaccount.cpp (1109-1122) nothing is done when the mood is 'None'. According to the spec (http://xmpp.org/extensions/xep-0107.html#proto-pubsub), an empty mood tag with no payload should be sent. Code snippet : void JabberAccount::slotSetMood() { KAction *action = (KAction *)sender(); Mood::Type type = (Mood::Type)action->data().toInt(); if(type == Mood::None) { } else { PubSubItem psi("current", Mood(type).toXml(*client()->client()->rootTask()->doc())); JT_PubSubPublish *task = new JT_PubSubPublish(client()->client()->rootTask(), QString("http://jabber.org/protocol/mood"), psi); task->go(true); } } I think this if check should be removed and the pubsub should be sent even if the type is 'None'. It looks like the toXml method in mood.cpp would need to be changed to not create a sub-QDomElement when mood id points to None and just return and self-closing <mood xmlns='http://jabber.org/protocol/mood'/> tag. I currently do not have the time to set up a build environment and test this,but it should be an easy fix for someone who knows the API and has a build env up and running. I'll try it myself in the next few days probably. Regards, Created attachment 37357 [details]
proposed patch to be able to reset a jabber mood back to none
SVN commit 1033390 by mattr: Fix setting user mood to 'None' Patch by Romain GUINOT. Thanks! This is the KDE 4.3 version of the patch. CCBUG: 111329 M +5 -9 jabberaccount.cpp M +13 -9 tasks/mood.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1033390 SVN commit 1033693 by mattr: Fix setting user mood to 'None' Patch by Romain GUINOT. Thanks! This is the KDE 4.4 version of the patch. It will also be fixed for KDE 4.3.3 BUG: 111329 M +5 -9 jabberaccount.cpp M +13 -9 tasks/mood.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1033693 |