1 package LJ
::Event
::CommunityMantioned
;
3 use Class
::Autouse
qw(LJ::Entry);
8 my ($class, $u, $fromu, $commu) = @_;
9 foreach ($u, $fromu, $commu) {
10 LJ
::errobj
('Event::CommunityMantioned', u
=> $_)->throw unless LJ
::isu
($_);
13 return $class->SUPER::new
($u, $fromu->{userid
}, $commu->{userid
});
17 sub available_for_user
{ 1 }
19 sub is_subscription_visible_to
{
22 return 0 if ($class->{user
}->prop('pingback') eq 'D');
23 return 1 if $u->can_manage($class->{user
});
27 sub subscription_as_html
{
28 my ($class, $subscr) = @_;
29 my $journal = $subscr->journal or croak
"No user";
31 return LJ
::Lang
::ml
('event.comm_mantioned', { community
=> $journal->ljuser_display } );
34 sub is_subscription_ntype_disabled_for
{
35 my ($self, $ntypeid, $u) = @_;
37 return 0 if $ntypeid == LJ
::NotificationMethod
::Email
->ntypeid;
43 package LJ
::Error
::Event
::CommunityMantioned
;
47 return "LJ::Event::CommuinityMantioned passed bogus u object: $self->{u}";