Summary: | MUC conference.jabber.org: Your message could not be delivered, Reason: "If set, the 'from' attribute must be set to the user's full JID." | ||
---|---|---|---|
Product: | [Applications] kopete | Reporter: | Helge Hielscher <hhielscher> |
Component: | Jabber Plugin | Assignee: | Kopete Developers <kopete-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | manuvarkey |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Mandriva RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Helge Hielscher
2006-08-18 21:30:12 UTC
I think it's a bug in the google's server implementation. Are you using a google talk account ? actually the bug is in Kopete, and in all others server that let Kopete not respect XMPP :-) Kopete use his room jid as form attribute for his stanza, which is wrong. I'll fix the problem. SVN commit 574390 by ogoffart: Fix Bug 132611: MUC error: Your message could not be delivered, Reason: "If set, the 'from' attribute must be set to the user's full JID."a Kopete was using the room nick JID instead of the normal JID as the XMPP core require. M +3 -8 jabberchatsession.cpp M +3 -4 jabbergroupchatmanager.cpp --- branches/KDE/3.5/kdenetwork/kopete/protocols/jabber/jabberchatsession.cpp #574389:574390 @@ -185,10 +185,6 @@ ++listIterator; if ( contact->isContactRequestingEvent( event ) ) { - // create JID for us as sender - XMPP::Jid fromJid = static_cast<const JabberBaseContact*>(myself())->rosterItem().jid(); - fromJid.setResource ( account()->resource () ); - // create JID for the recipient XMPP::Jid toJid = contact->rosterItem().jid(); @@ -198,7 +194,7 @@ XMPP::Message message; - message.setFrom ( fromJid ); + message.setFrom ( account()->client()->jid() ); message.setTo ( toJid ); message.setEventId ( contact->lastReceivedMessageId () ); // store composing event depending on state @@ -243,10 +239,9 @@ XMPP::Message jabberMessage; JabberBaseContact *recipient = static_cast<JabberBaseContact*>(message.to().first()); - XMPP::Jid jid = static_cast<const JabberBaseContact*>(message.from())->rosterItem().jid(); - jid.setResource ( account()->configGroup()->readEntry( "Resource", QString::null ) ); - jabberMessage.setFrom ( jid ); + jabberMessage.setFrom ( account()->client()->jid() ); + XMPP::Jid toJid = recipient->rosterItem().jid(); if( !resource().isEmpty () ) --- branches/KDE/3.5/kdenetwork/kopete/protocols/jabber/jabbergroupchatmanager.cpp #574389:574390 @@ -79,8 +79,8 @@ { XMPP::Message jabberMessage; - XMPP::Jid jid = static_cast<const JabberBaseContact*>(message.from())->rosterItem().jid() ; - jabberMessage.setFrom ( jid ); + jabberMessage.setFrom ( account()->client()->jid() ); + XMPP::Jid toJid ( mRoomJid ); @@ -142,8 +142,7 @@ //NOTE: this is the obsolete, NOT RECOMMANDED protocol. // iris doesn't implement groupchat yet XMPP::Message jabberMessage; - XMPP::Jid jid = static_cast<const JabberBaseContact*>(account()->myself())->rosterItem().jid() ; - jabberMessage.setFrom ( jid ); + jabberMessage.setFrom ( account()->client()->jid() ); jabberMessage.setTo ( contactId ); jabberMessage.setInvite( mRoomJid.userHost() ); jabberMessage.setBody( i18n("You have been invited to %1").arg( mRoomJid.userHost() ) ); *** Bug 134305 has been marked as a duplicate of this bug. *** |