From 8ff044804db56c34053ffd538791f0a23f5c9bd1 Mon Sep 17 00:00:00 2001 From: Dara Poon Date: Thu, 15 Feb 2024 10:52:36 -0800 Subject: [PATCH] Fix cross-robot list inclusion (#1797) If the Sympa::List->new($name, $robot, $options) constructor is called with an optional $robot parameter specified, then that $robot overrides any domain that may be present in $name. When constructing a DataSource for inclusion, the robot of the DataSource should be inferred only if no domain is present in the list name. --- src/lib/Sympa/DataSource/List.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Sympa/DataSource/List.pm b/src/lib/Sympa/DataSource/List.pm index 987381753..2a64da04b 100644 --- a/src/lib/Sympa/DataSource/List.pm +++ b/src/lib/Sympa/DataSource/List.pm @@ -45,7 +45,8 @@ sub _new { my $list = $self->{context}; if (ref $list eq 'Sympa::List') { - my $inlist = Sympa::List->new($self->{listname}, $list->{'domain'}, + my $inlist = Sympa::List->new($self->{listname}, + ($self->{listname} =~ /\@/ ? undef : $list->{'domain'}), {just_try => 1}); $self->{listname} = $inlist->get_id if $inlist; }