File: mentions.rb

package info (click to toggle)
mikutter 3.0.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 9,396 kB
  • ctags: 1,916
  • sloc: ruby: 16,619; sh: 117; makefile: 27
file content (17 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- coding: utf-8 -*-
# mentions.rb
#
# Reply display/post support

Plugin.create :mentions do
  tab :mentions, _("Replies") do
    set_icon Skin.get("reply.png")
    timeline :mentions end

  on_mention do |service, messages|
    timeline(:mentions) << messages end

  on_favorite do |service, fav_by, message|
    if UserConfig[:favorited_by_anyone_act_as_reply] and fav_by[:idname] != service.idname
      timeline(:mentions) << message end end
end