diff --git a/core/plugin/twitter/model.rb b/core/plugin/twitter/model.rb index 8196e6c..bacaf21 100644 --- a/core/plugin/twitter/model.rb +++ b/core/plugin/twitter/model.rb @@ -6,3 +6,23 @@ require_relative 'model/message' require_relative 'model/user' require_relative 'model/userlist' require_relative 'model/world' + +module Plugin::Twitter + class MarkAsUnescapedNote < Diva::Model + register :mark_as_unescaped_note, name: "Mark As Unescaped Note" + + @@instance = MarkAsUnescapedNote.new({}) + + def self.get + @@instance + end + + def description + "" + end + + def inspect + "[MarkAsUnescapedNote]" + end + end +end diff --git a/core/plugin/twitter/twitter.rb b/core/plugin/twitter/twitter.rb index 1cb0208..765ed96 100644 --- a/core/plugin/twitter/twitter.rb +++ b/core/plugin/twitter/twitter.rb @@ -297,6 +297,9 @@ Plugin.create(:twitter) do score = score_by_entity(message) + extended_entity_media(message) if !score.all?{|n| n.class.slug == :score_text } yielder << score + else + score.unshift Plugin::Twitter::MarkAsUnescapedNote.get + yielder << score end end [message, note, yielder]