diff --git a/chat.less b/chat.less index 965e6d874..376b3a346 100644 --- a/chat.less +++ b/chat.less @@ -113,6 +113,11 @@ .bb-message-action { font-weight: bold; background: #eee; color: #444; padding: 2px 0; + blockquote { + padding-bottom: 0; + margin-bottom: 0; + border-left-color: #38A1F3; + } } .bb-message-action, .bb-message-system { padding-left: 80px; diff --git a/server/twitterwatch.coffee b/server/twitterwatch.coffee index 2905b67a0..60a9a1e2e 100644 --- a/server/twitterwatch.coffee +++ b/server/twitterwatch.coffee @@ -41,6 +41,11 @@ linkify = do -> when username? then "#{sp}#{username}" else text # shouldn't really ever reach here +htmlify = (data) -> + text = data.extended_tweet?.full_text or data.text + text = linkify text + "@#{data.user.screen_name} says: #{text}" + # See https://dev.twitter.com/streaming/overview/request-parameters#track hashtag = 'mysteryhunt,mitmysteryhunt' twit.stream 'statuses/filter', {track: hashtag}, (stream) -> @@ -51,10 +56,13 @@ twit.stream 'statuses/filter', {track: hashtag}, (stream) -> console.log 'WEIRD TWIT!', data return console.log "Twitter! @#{data.user.screen_name} #{data.text}" - text = linkify data.text + html = htmlify data + if data.quoted_status? + quote = htmlify data.quoted_status + html = "#{html}
#{quote}
" Meteor.call 'newMessage', nick: 'via twitter' action: 'true' - body: "@#{data.user.screen_name} says: #{text}" + body: html bodyIsHtml: true bot_ignore: true