my $accountname = undef;
my $dropped = undef;
- my $initial = undef;
my $id = undef;
if ($first) {
$id = $first->contact->account->id;
}
- if ($self->channel_namespaces->first) {
- $initial = $self->channel_namespaces->first->namespace;
+ my @namespaces;
+ foreach my $ns ($self->channel_namespaces) {
+ push @namespaces, $ns->namespace
}
return {
'initial_contact_account_name' => $accountname,
'initial_contact_account_id' => $id,
'initial_contact_account_dropped' => $dropped,
- 'initial_namespace_name' => $initial,
+ 'channel_namespaces' => \@namespaces
}
}
$dropped = $first->contact->account->is_dropped;
}
+ my @namespaces;
+ foreach my $ns ($self->channel_namespaces) {
+ push @namespaces, $ns->namespace
+ }
+
return {
'id' => $self->id,
'name' => $self->group_name,
'initial_contact_account_name' => $accountname,
'initial_contact_account_id' => $id,
'initial_contact_account_dropped' => $dropped,
- 'initial_namespace_name' => $self->channel_namespaces->first->namespace,
+ 'channel_namespaces' => \@namespaces
}
}
var __GROUP = 'Group: ';
var __GROUPS = 'groups';
var __INITIAL_CONTACT = 'Initial contact: ';
-var __INITIAL_NAMESPACE = 'Initial namespace: ';
+var __INITIAL_CHANNEL_NAMESPACES = 'Initial namespaces: ';
var __HIDDEN_PLACEHOLDER = 'Optional freetext about the change.';
var __MARK = '<b>Note:</b> the account has been <b>marked</b> by <b>%setter</b> on %time:' + __BR + '<b>%mark</b>';
var __NAME = 'Name: ';
"</small>" +
"%group_type" + __GROUP_TYPE + __BR +
__INITIAL_CONTACT + "<a target='_blank' href='" + __URL_USER + "'>%group_initial_contact</a>" + __BR +
- __INITIAL_NAMESPACE + "#%group_initial_namespace / #%group_initial_namespace-*" + __BR +
+ __INITIAL_CHANNEL_NAMESPACES + "%initial_channel_namespaces" + __BR +
"%requestor_account_dropped" +
"</blockquote>" +
"</div>";
html = html.replace (/\%group_name/g, escapeHtml(group.name));
html = html.replace (/\%group_initial_contact/g, escapeHtml(group.initial_contact_account_name));
html = html.replace (/\%account_id/g, escapeHtml(group.initial_contact_account_id));
- html = html.replace (/\%group_initial_namespace/g, escapeHtml(group.initial_namespace_name));
+ html = html.replace (/\%initial_channel_namespaces/g, escapeHtml(group.channel_namespaces.map(function(ns) { return "#" + ns; }).join(", ")));
html = html.replace (/\%group_url/g, escapeHtml(group.url));
html = html.replace (/\%group_type/g, escapeHtml(group.type));