| Summary: | kopete doesnt show the typing notice from people using gtalk, and they can see the ones sent by kopete | ||
|---|---|---|---|
| Product: | [Unmaintained] kopete | Reporter: | kaouete <kaouete> |
| Component: | Jabber Plugin | Assignee: | Kopete Developers <kopete-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | 0.12 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
kaouete
2006-02-06 21:53:14 UTC
i am wondering if it is not because google desactivated this option. (notice from gtalk to gtalk are not shown in gtalk, but maybe they are sent . ..) (it is maybe a problem with jep used .. . ) The google talk client simply doesn't support this feature. I am sorry to reopen this bug, but i can see that if i am taking to someone using gtalk with gajim, he can see my typing notice (but i did not see its). and the reason why it doesnt work with kopete is (i think) that they use another jep (newer one i guess, doesnt know the details) to notify typing. so the new ideo of this bug is more a wish to have this jep supported (http://www.jabber.org/jeps/jep-0085.html if i am not wrong) in fact i can see gtalk users typing with gajim, i dont know why i havent seen it before, anyway it looks like it works in both way with gajim and if i am not wrong gajim use jep 85. yes, Kopete doesn't support yet JEP 85 SVN commit 517351 by ogoffart: Fix bug 121507: Some users shown offline althought they are online. We need to send our presence info after having _received_ the roster (and not only asked for it). because some clients like ejabberd can't assure the order of messages. BUG: 121507 M +8 -8 jabberaccount.cpp --- branches/kopete/0.12/kopete/protocols/jabber/jabberaccount.cpp #517350:517351 @@ -589,14 +589,6 @@ kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Requesting roster..." << endl; m_jabberClient->requestRoster (); - - /* Since we are online now, set initial presence. Don't do this - * before the roster request or we will receive presence - * information before we have updated our roster with actual - * contacts from the server! (Iris won't forward presence - * information in that case either). */ - kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Setting initial presence..." << endl; - setPresence ( m_initialPresence ); } void JabberAccount::slotRosterRequestFinished ( bool success ) @@ -609,6 +601,14 @@ contactPool()->cleanUp (); } + /* Since we are online now, set initial presence. Don't do this + * before the roster request or we will receive presence + * information before we have updated our roster with actual + * contacts from the server! (Iris won't forward presence + * information in that case either). */ + kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Setting initial presence..." << endl; + setPresence ( m_initialPresence ); + } void JabberAccount::slotIncomingFileTransfer () SVN commit 517353 by ogoffart: backport fix for bug 121507 CCBUG: 121507 M +8 -8 jabberaccount.cpp --- branches/KDE/3.5/kdenetwork/kopete/protocols/jabber/jabberaccount.cpp #517352:517353 @@ -498,14 +498,6 @@ kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Requesting roster..." << endl; m_jabberClient->requestRoster (); - /* Since we are online now, set initial presence. Don't do this - * before the roster request or we will receive presence - * information before we have updated our roster with actual - * contacts from the server! (Iris won't forward presence - * information in that case either). */ - kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Setting initial presence..." << endl; - setPresence ( m_initialPresence ); - } void JabberAccount::slotRosterRequestFinished ( bool success ) @@ -518,6 +510,14 @@ contactPool()->cleanUp (); } + /* Since we are online now, set initial presence. Don't do this + * before the roster request or we will receive presence + * information before we have updated our roster with actual + * contacts from the server! (Iris won't forward presence + * information in that case either). */ + kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Setting initial presence..." << endl; + setPresence ( m_initialPresence ); + } void JabberAccount::slotIncomingFileTransfer () Ooops, mistake, i closed the wrong bug. sorry, reopening this one SVN commit 525779 by ogoffart:
support of the new chatstate protocol (JEP-0085)
BUG: 121507
A 007_chatstates.patch
M +1 -1 iris/include/im.h
M +1 -0 iris/xmpp-core/protocol.h
M +52 -4 iris/xmpp-im/types.cpp [UTF-8 ENCODING PROBLEMS]
--- branches/kopete/0.12/kopete/protocols/jabber/libiris/iris/include/im.h #525778:525779
@@ -49,7 +49,7 @@
typedef QValueList<Url> UrlList;
typedef QMap<QString, QString> StringMap;
typedef enum { OfflineEvent, DeliveredEvent, DisplayedEvent,
- ComposingEvent, CancelEvent } MsgEvent;
+ ComposingEvent, CancelEvent, InactiveEvent, GoneEvent } MsgEvent;
class Message
{
--- branches/kopete/0.12/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h #525778:525779
@@ -37,6 +37,7 @@
#define NS_BIND "urn:ietf:params:xml:ns:xmpp-bind"
#define NS_XHTML_IM "http://jabber.org/protocol/xhtml-im"
#define NS_XHTML "http://www.w3.org/1999/xhtml"
+#define NS_CHATSTATES "http://jabber.org/protocol/chatstates"
namespace XMPP
{
--- branches/kopete/0.12/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp #525778:525779
@@ -544,28 +544,49 @@
else
x.appendChild(s.createTextElement("jabber:x:event","id",d->eventId));
}
+ else
+ s.appendChild( s.createElement(NS_CHATSTATES , "active" ) );
+ bool need_x_event=false;
for(QValueList<MsgEvent>::ConstIterator ev = d->eventList.begin(); ev != d->eventList.end(); ++ev) {
switch (*ev) {
case OfflineEvent:
x.appendChild(s.createElement("jabber:x:event", "offline"));
+ need_x_event=true;
break;
case DeliveredEvent:
x.appendChild(s.createElement("jabber:x:event", "delivered"));
+ need_x_event=true;
break;
case DisplayedEvent:
x.appendChild(s.createElement("jabber:x:event", "displayed"));
+ need_x_event=true;
break;
case ComposingEvent:
x.appendChild(s.createElement("jabber:x:event", "composing"));
+ need_x_event=true;
+ if (d->body.isEmpty())
+ s.appendChild( s.createElement(NS_CHATSTATES , "composing" ) );
break;
case CancelEvent:
- // Add nothing
+ need_x_event=true;
+ if (d->body.isEmpty())
+ s.appendChild( s.createElement(NS_CHATSTATES , "paused" ) );
break;
+ case InactiveEvent:
+ if (d->body.isEmpty())
+ s.appendChild( s.createElement(NS_CHATSTATES , "inactive" ) );
+ break;
+ case GoneEvent:
+ if (d->body.isEmpty())
+ s.appendChild( s.createElement(NS_CHATSTATES , "gone" ) );
+ break;
}
}
- s.appendChild(x);
- }
+ if(need_x_event) //we don't need to have the (empty) x:event element if this is only <gone> or <inactive>
+ s.appendChild(x);
+ }
+
// xencrypted
if(!d->xencrypted.isEmpty())
@@ -595,6 +616,7 @@
d->subject.clear();
d->body.clear();
d->thread = QString();
+ d->eventList.clear();
QDomElement root = s.element();
@@ -631,6 +653,33 @@
}
}
}
+ else if (e.namespaceURI() == NS_CHATSTATES)
+ {
+ if(e.tagName() == "active")
+ {
+ //like in JEP-0022 we let the client know that we can receive ComposingEvent
+ // (we can do that according to
you are going to laugh but i am talking with someone who use gtalk and he says to me that it can see me typing (but using gajim he can). i can see him typing since this jep was added to kopete. i can see that kopete is sending typing notice : kopete (jabber - raw protocol): [void JabberAccount::slotClientDebugMessage(const QString&)] XML OUT: <message from="me@jabber.org/Kopete" id="ac0ea" to="him@gmail.com/Talk.v86B871A8B3" > <composing xmlns="http://jabber.org/protocol/chatstates"/> <x xmlns="jabber:x:event"> <id/> <composing/> </x> </message> kopete (jabber - raw protocol): kopete (jabber): [void JabberChatSession::slotSendTypingNotification(bool)] Sending out typing notification (true) to all chat members. kopete (jabber - raw protocol): [void JabberAccount::slotClientDebugMessage(const QString&)] XML OUT: <message from="me@jabber.org/Kopete" id="ac0fa" to="him@gmail.com/Talk.v86B871A8B3" > <composing xmlns="http://jabber.org/protocol/chatstates"/> <x xmlns="jabber:x:event"> <id/> <composing/> </x> </message> and, something to take carefully : he says that before he was able to see me typing but i think he talks about the few times i used gajim :] that's why the bug is now marked as resolved :-) the problem is that it is not resolved since the person who i am talking to doesnt see typing notice from kopete but see the ones from gajim : is this jep implemented only in one way ? (him to me, and not me to him) i understand my mistake :] i wrote can instead of cant :> SVN commit 526247 by ogoffart:
JEP-0085 seems require the type of the chat to be set.
(tested with gajim)
CCBUG: 121507
M +13 -1 jabberchatsession.cpp
A libiris/008_chatstatesfix.patch
M +5 -5 libiris/iris/xmpp-im/types.cpp
--- branches/kopete/0.12/kopete/protocols/jabber/jabberchatsession.cpp #526246:526247
@@ -76,7 +76,9 @@
JabberChatSession::~JabberChatSession( )
{
- sendNotification( XMPP::GoneEvent );
+ if ( account()->configGroup()->readBoolEntry ("SendEvents", true) &&
+ account()->configGroup()->readBoolEntry ("SendGoneEvent", true) )
+ sendNotification( XMPP::GoneEvent );
}
@@ -182,6 +184,16 @@
message.setEventId ( contact->lastReceivedMessageId () );
// store composing event depending on state
message.addEvent ( event );
+
+ if (view() && view()->plugin()->pluginId() == "kopete_emailwindow" )
+ {
+ message.setType ( "normal" );
+ }
+ else
+ {
+ message.setType ( "chat" );
+ }
+
// send message
account()->client()->sendMessage ( message );
--- branches/kopete/0.12/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp #526246:526247
@@ -544,7 +544,7 @@
else
x.appendChild(s.createTextElement("jabber:x:event","id",d->eventId));
}
- else
+ else if (d->type=="chat" || d->type=="groupchat")
s.appendChild( s.createElement(NS_CHATSTATES , "active" ) );
bool need_x_event=false;
@@ -565,20 +565,20 @@
case ComposingEvent:
x.appendChild(s.createElement("jabber:x:event", "composing"));
need_x_event=true;
- if (d->body.isEmpty())
+ if (d->body.isEmpty() && (d->type=="chat" || d->type=="groupchat") )
s.appendChild( s.createElement(NS_CHATSTATES , "composing" ) );
break;
case CancelEvent:
need_x_event=true;
- if (d->body.isEmpty())
+ if (d->body.isEmpty() && (d->type=="chat" || d->type=="groupchat") )
s.appendChild( s.createElement(NS_CHATSTATES , "paused" ) );
break;
case InactiveEvent:
- if (d->body.isEmpty())
+ if (d->body.isEmpty() && (d->type=="chat" || d->type=="groupchat") )
s.appendChild( s.createElement(NS_CHATSTATES , "inactive" ) );
break;
case GoneEvent:
- if (d->body.isEmpty())
+ if (d->body.isEmpty() && (d->type=="chat" || d->type=="groupchat") )
s.appendChild( s.createElement(NS_CHATSTATES , "gone" ) );
break;
}
|