プロジェクト

全般

プロフィール

1233-dummynote.patch

cob odo, 2018-05-17 01:07

差分を表示:

core/plugin/twitter/model.rb
6 6
require_relative 'model/user'
7 7
require_relative 'model/userlist'
8 8
require_relative 'model/world'
9

  
10
module Plugin::Twitter
11
  class MarkAsUnescapedNote < Diva::Model
12
    register :mark_as_unescaped_note, name: "Mark As Unescaped Note"
13

  
14
    @@instance = MarkAsUnescapedNote.new({})
15

  
16
    def self.get
17
      @@instance
18
    end
19

  
20
    def description
21
      ""
22
    end
23

  
24
    def inspect
25
      "[MarkAsUnescapedNote]"
26
    end
27
  end
28
end
core/plugin/twitter/twitter.rb
297 297
      score = score_by_entity(message) + extended_entity_media(message)
298 298
      if !score.all?{|n| n.class.slug == :score_text }
299 299
        yielder << score
300
      else
301
        score.unshift Plugin::Twitter::MarkAsUnescapedNote.get
302
        yielder << score
300 303
      end
301 304
    end
302 305
    [message, note, yielder]