[Tkabber-dev] r1790 - in trunk/tkabber-plugins: . receipts

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Apr 23 10:33:26 MSD 2009


Author: sergei
Date: 2009-04-23 10:33:26 +0400 (Thu, 23 Apr 2009)
New Revision: 1790

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/receipts/receipts.tcl
Log:
	* receipts/receipts.tcl: Enabled receipts even if the confirmation
	  message is received from a resource different from the resource where
	  the initial message was sent to. It is useful if one sends a message
	  to an offline resource and server reroutes it to an available one.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2009-04-23 06:30:09 UTC (rev 1789)
+++ trunk/tkabber-plugins/ChangeLog	2009-04-23 06:33:26 UTC (rev 1790)
@@ -1,3 +1,10 @@
+2009-04-23  Sergei Golovan <sgolovan at nes.ru>
+
+	* receipts/receipts.tcl: Enabled receipts even if the confirmation
+	  message is received from a resource different from the resource where
+	  the initial message was sent to. It is useful if one sends a message
+	  to an offline resource and server reroutes it to an available one.
+
 2009-04-01  Sergei Golovan <sgolovan at nes.ru>
 
 	* jidlink/msgs/de.msg: Updated German translation (thanks to Roger

Modified: trunk/tkabber-plugins/receipts/receipts.tcl
===================================================================
--- trunk/tkabber-plugins/receipts/receipts.tcl	2009-04-23 06:30:09 UTC (rev 1789)
+++ trunk/tkabber-plugins/receipts/receipts.tcl	2009-04-23 06:33:26 UTC (rev 1790)
@@ -125,14 +125,14 @@
 proc receipts::process_receipt_response {xlib from id type} {
     variable requests
 
-    set chatid [chat::chatid $xlib $from]
-    if {![chat::is_opened $chatid]} return
-    set cw [chat::chat_win $chatid]
+    foreach chatid [chat::opened $xlib [::xmpp::jid::stripResource $from]] {
+	set cw [chat::chat_win $chatid]
 
-    set name msgid_$id
-    if {[lsearch -exact [$cw image names] $name] >= 0} {
-	$cw image configure $name -image receipts/confirmed
-	return
+	set name msgid_$id
+	if {[lsearch -exact [$cw image names] $name] >= 0} {
+	    $cw image configure $name -image receipts/confirmed
+	    return
+	}
     }
 }
 



More information about the Tkabber-dev mailing list