[615] in BarnOwl Developers

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

[D-O-H] r719 - trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber

daemon@ATHENA.MIT.EDU (asedeno@MIT.EDU)
Thu Oct 29 18:07:58 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: Mon, 28 May 2007 21:56:27 -0400 (EDT)

Author: asedeno
Date: 2007-05-28 21:56:26 -0400 (Mon, 28 May 2007)
New Revision: 719

Modified:
   trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Connection.pm
Log:
r675, take two. This was lost in the merging of the PAR branch.

Fix the bug in which rejoining a MUC you're already in (nick change)
results in the MUC appearing multiple times when you show presence
info for all MUCs.



Modified: trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Connection.pm
===================================================================
--- trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Connection.pm	2007-05-24 22:16:20 UTC (rev 718)
+++ trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Connection.pm	2007-05-29 01:56:26 UTC (rev 719)
@@ -42,7 +42,9 @@
     my $self = shift;
     my $muc = Net::Jabber::MUC->new(connection => $self, @_);
     $muc->Join(@_);
-    push @{$self->MUCs}, $muc;
+
+    # Add MUC to list of MUCs, unless we're just changing nicks.
+    push @{$self->MUCs}, $muc unless grep {$_->BaseJID eq $muc->BaseJID} $self->MUCs;
 }
 
 =head2 MUCLeave ARGS


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