summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Bot/Flowdock/IRC.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Bot/Flowdock/IRC.pm b/lib/Bot/Flowdock/IRC.pm
index 76cfdb9..bd0a8c3 100644
--- a/lib/Bot/Flowdock/IRC.pm
+++ b/lib/Bot/Flowdock/IRC.pm
@@ -131,6 +131,10 @@ sub said {
# poco::irc at some point.
my $msg = ($address ? "$address: " : '') . $args->{body};
+ # XXX when they allow external users to post status update events, fix this
+ $msg = '*' . $msg . '*'
+ if $args->{emoted};
+
$self->flowdock_api->push_chat({
external_user_name => $args->{who},
content => $msg,
@@ -139,6 +143,14 @@ sub said {
return;
}
+around emoted => sub {
+ my $orig = shift;
+ my $self = shift;
+ my ($args) = @_;
+ $args->{emoted} = 1;
+ return $self->$orig($args);
+};
+
__PACKAGE__->meta->make_immutable;
no Moose;