summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/libiris/008_chatstatesfix.patch
blob: 63a4f6809be255e9a7a04b0b8a2e7d31a31620c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Index: iris/xmpp-im/types.cpp
===================================================================
--- iris/xmpp-im/types.cpp	(revision 526236)
+++ iris/xmpp-im/types.cpp	(working copy)
@@ -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;
 			}