X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fwebhook.rb;fp=data%2Frbot%2Fplugins%2Fwebhook.rb;h=502b5e9372692cefa302929ed4b28c2d249abbe2;hb=464e8afad5d3c72378b680f4579773adbd089f8f;hp=cf93d9a732678cb28ac88f8e2df048b09150eb90;hpb=e01699c5284bdb45f88ee6335dc90f25f4932b66;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/webhook.rb b/data/rbot/plugins/webhook.rb index cf93d9a7..502b5e93 100644 --- a/data/rbot/plugins/webhook.rb +++ b/data/rbot/plugins/webhook.rb @@ -227,6 +227,13 @@ class WebHookPlugin < Plugin num = json[:size] || json[:commits].size rescue nil stream_hash[:number] = _("%{num} commits") % { :num => num } if num + case event + when :watch + stream_hash[:number] ||= 'watching 👀%{watchers_count}' % json[:repository] + when :star + stream_hash[:number] ||= 'star ☆ %{watchers_count}' % json[:repository] + end + debug stream_hash return input_stream.merge stream_hash