From d5fc00892be26662d744705f86cae247fbbe3597 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 16 Feb 2012 20:37:46 -0600 Subject: don't strip off "flowdock: ", also ignore privmsgs --- lib/Bot/Flowdock/IRC.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/Bot/Flowdock/IRC.pm b/lib/Bot/Flowdock/IRC.pm index 45d26f3..18bff1d 100644 --- a/lib/Bot/Flowdock/IRC.pm +++ b/lib/Bot/Flowdock/IRC.pm @@ -122,9 +122,18 @@ sub said { my $self = shift; my ($args) = @_; + my $address = $args->{address} || ''; + + return if $address eq 'msg'; + + # XXX: Bot::BasicBot does a lot of "helpful" munging of messages that we + # receive. this is annoying for this use case. look into switching to raw + # poco::irc at some point. + my $msg = ($address ? "$address: " : '') . $args->{body}; + $self->flowdock_api->push_chat({ external_user_name => $args->{who}, - content => $args->{body}, + content => $msg, }); return; -- cgit v1.2.3