[Tkabber-dev] r920 - in trunk/tkabber: . pixmaps/default/docking pixmaps/default/roster plugins/chat

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Feb 11 00:50:14 MSK 2007


Author: sergei
Date: 2007-02-11 00:50:10 +0300 (Sun, 11 Feb 2007)
New Revision: 920

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/pixmaps/default/docking/invisible.gif
   trunk/tkabber/pixmaps/default/roster/invisible.gif
   trunk/tkabber/plugins/chat/chatstate.tcl
Log:
	* pixmaps/default/roster/invisible.gif,
	  pixmaps/default/docking/invisible.gif: Fixed.

	* plugins/chat/chatstate.tcl: Made workaround of the bug in JIT, which
	  raise an error if chat state notification message is sent without a
	  body.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-02-10 16:00:55 UTC (rev 919)
+++ trunk/tkabber/ChangeLog	2007-02-10 21:50:10 UTC (rev 920)
@@ -9,6 +9,13 @@
 	  plugins/richtext/emoticons.tcl: Replaced ~/.tkabber by actual
 	  config directory name.
 
+	* pixmaps/default/roster/invisible.gif,
+	  pixmaps/default/docking/invisible.gif: Fixed.
+
+	* plugins/chat/chatstate.tcl: Made workaround of the bug in JIT, which
+	  raise an error if chat state notification message is sent without a
+	  body.
+
 2007-02-09  Sergei Golovan  <sgolovan at nes.ru>
 
 	* messages.tcl: Launch browser on jabber:x:oob attachments, and

Modified: trunk/tkabber/pixmaps/default/docking/invisible.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/roster/invisible.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/plugins/chat/chatstate.tcl
===================================================================
--- trunk/tkabber/plugins/chat/chatstate.tcl	2007-02-10 16:00:55 UTC (rev 919)
+++ trunk/tkabber/plugins/chat/chatstate.tcl	2007-02-10 21:50:10 UTC (rev 920)
@@ -12,6 +12,19 @@
 	-type boolean -group Chatstate
 }
 
+# Workaround a bug in JIT, which responds with error to chatstate
+# events without a body
+proc chatstate::ignore_error \
+     {connid from id type is_subject subject body err thread priority x} {
+    switch -- $type/$id {
+	error/chatstate {
+	    return stop
+	}
+    }
+}
+
+hook::add process_message_hook [namespace current]::chatstate::ignore_error 20
+
 proc chatstate::flush_composing {chatid user body type} {
     variable chatstate
 
@@ -137,7 +150,7 @@
     lappend xlist [jlib::wrapper:createtag composing \
 		       -vars [list xmlns $::NS(chatstate)]]
 
-    jlib::send_msg $jid -xlist $xlist -connection $connid
+    jlib::send_msg $jid -id chatstate -xlist $xlist -connection $connid
 }
 
 proc chatstate::setup_ui {chatid type} {
@@ -208,7 +221,7 @@
     lappend xlist [jlib::wrapper:createtag gone \
 		       -vars [list xmlns $::NS(chatstate)]]
 
-    jlib::send_msg $jid -xlist $xlist -connection $connid
+    jlib::send_msg $jid -id chatstate -xlist $xlist -connection $connid
 }
 
 hook::add close_chat_post_hook \



More information about the Tkabber-dev mailing list