[436] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[D-O-H] r567 - trunk/owl/perl/modules

daemon@ATHENA.MIT.EDU (asedeno@MIT.EDU)
Thu Oct 29 18:06:09 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: asedeno@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Thu, 25 Jan 2007 01:05:38 -0500 (EST)

Author: asedeno
Date: 2007-01-25 01:05:34 -0500 (Thu, 25 Jan 2007)
New Revision: 567

Modified:
   trunk/owl/perl/modules/jabber.pl
Log:
Make resolveDestJID be clever enough to check if the input is a valid
jid before rejecting it outright; make it reject things that aren't
valid jids and don't otherwise resolve.



Modified: trunk/owl/perl/modules/jabber.pl
===================================================================
--- trunk/owl/perl/modules/jabber.pl	2007-01-25 05:03:54 UTC (rev 566)
+++ trunk/owl/perl/modules/jabber.pl	2007-01-25 06:05:34 UTC (rev 567)
@@ -1363,14 +1363,10 @@
         }
     }
 
-    my @mucs = $conn->getConnectionFromJID($from)->MUCs;
-    for my $m (@mucs) {
-        if ($m->BaseJID eq $to) {
-            return $m->BaseJID;
-        }
-    }
-
-    return $to;
+    # If we found nothing being clever, check to see if our input was
+    # sane enough to look like a jid with a UserID.
+    return $jid->GetJID('full') if $jid->GetUserID();
+    return undef;
 }
 
 sub resolveType {


home help back first fref pref prev next nref lref last post