Open ooduor opened 11 years ago
Here is my draft of mute plugin :).
Earthquake.once do
@muting_screen_names ||= []
end
Earthquake.init do
output_filter do |item|
next unless item["_stream"]
item["user"] && !@muting_screen_names.include?(item["user"]["screen_name"])
end
command :mute do |m|
(@muting_screen_names << m[1].delete(?@)).uniq!
end
command :unmute do
@muting_screen_names.clear
end
end
:+1:
Could you please add support for muting. I presume the extra command could be something ike:
:mute Username or :mute #HashTag
Then all tweets/retweets from the user or with the hashtag won't be shown in the stream. Then :unmute would reverse the action.
Thank you!