| 1 | package Exobrain::Agent::Action::SocialNotify; | ||
| 2 | use Moose; | ||
| 3 | use Method::Signatures; | ||
| 4 | |||
| 5 | # ABSTRACT: Notify user of social events directed at them. | ||
| 6 | our $VERSION = '1.08'; # VERSION | ||
| 7 | |||
| 8 | with 'Exobrain::Agent::Run'; | ||
| 9 | |||
| 10 | method run { | ||
| 11 | $self->exobrain->watch_loop( | ||
| 12 | class => 'Measurement::Social', | ||
| 13 | filter => sub { $_->to_me }, | ||
| 14 | then => sub { | ||
| 15 | $self->exobrain->notify( $_->summary ) | ||
| 16 | }, | ||
| 17 | ); | ||
| 18 | } | ||
| 19 | |||
| 20 | 1; | ||
| 21 | |||
| 22 | __END__ |