Last active
February 12, 2019 05:54
-
-
Save cobodo/91b5a616a0050d91ae70990722900cce to your computer and use it in GitHub Desktop.
mikutterがTLに持っているメッセージ全体から検索するプラグイン
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://dev.mikutter.hachune.net/issues/1309 の、core/plugin/gui/timeline.rb へのパッチが必要。 | |
# Usage: Plugin.call(:local_search, ":don:") | |
Plugin.create(:local_search) do | |
on_local_search do |keyword| | |
ms = Plugin::GUI::Timeline.cuscaded.values.flat_map {|tl| tl.to_a }.uniq {|m| m.uri } | |
found = ms.select {|m| m.description.include? keyword } | |
Plugin.call(:open_smartthread, found) | |
end | |
# commandもあるとよいね | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment