[Tkabber-dev] r1512 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Oct 11 17:08:59 MSD 2008


Author: sergei
Date: 2008-10-11 17:08:59 +0400 (Sat, 11 Oct 2008)
New Revision: 1512

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/muc.tcl
Log:
	* muc.tcl: Request MUC info not only from server but also from the
	  room itself when joining conference room. It allows to use
	  redirectors like J2J transport.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-10-11 12:08:18 UTC (rev 1511)
+++ trunk/tkabber/ChangeLog	2008-10-11 13:08:59 UTC (rev 1512)
@@ -7,6 +7,10 @@
 	* chats.tcl, ifacetk/iface.tcl: Added command which programmatically
 	  closes chat window (thanks to Konstantin Khomoutov).
 
+	* muc.tcl: Request MUC info not only from server but also from the
+	  room itself when joining conference room. It allows to use
+	  redirectors like J2J transport.
+
 2008-10-10  Sergei Golovan  <sgolovan at nes.ru>
 
 	* doc/tkabber.html, doc/tkabber.xml, README: Added notes about new

Modified: trunk/tkabber/muc.tcl
===================================================================
--- trunk/tkabber/muc.tcl	2008-10-11 12:08:18 UTC (rev 1511)
+++ trunk/tkabber/muc.tcl	2008-10-11 13:08:59 UTC (rev 1512)
@@ -1393,11 +1393,11 @@
     disco::request_info [server_from_jid $group] "" \
 	-connection $connid \
 	-cache yes \
-	-handler [list muc::recv_negotiation $group]
+	-handler [list muc::recv_negotiation1 $connid $group]
 }
 
 
-proc muc::recv_negotiation {group res identities features extras} {
+proc muc::recv_negotiation1 {connid group res identities features extras} {
     variable muc_compatible
 
     if {[cequal $res OK]} {
@@ -1409,6 +1409,25 @@
 	    }
 	}
     }
+
+    disco::request_info $group "" \
+	-connection $connid \
+	-cache yes \
+	-handler [list muc::recv_negotiation2 $group]
+}
+
+proc muc::recv_negotiation2 {group res identities features extras} {
+    variable muc_compatible
+
+    if {[cequal $res OK]} {
+	foreach f $features {
+	    set var [jlib::wrapper:getattr $f var]
+	    if {$var == $::NS(muc)} {
+		set muc_compatible($group) 1
+		return
+	    }
+	}
+    }
     set muc_compatible($group) 0
 }
 



More information about the Tkabber-dev mailing list