Skip to content

Commit

Permalink
Was missing a comma, not sure if it mattered though.
Browse files Browse the repository at this point in the history
  • Loading branch information
oponder committed Mar 9, 2013
1 parent 7e653d6 commit b80f097
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -25,18 +25,15 @@ class Kandan.Plugins.YouTubeEmbed
else
# Spaces indicate a subtitle
comment = $.trim(message.content.substr(message.content.indexOf(" ") + 1));
videoUrl = message.content.split(" ")[0]

videoId = message.content.match(@options.idRegex)[1]

thumbUrl = "http://img.youtube.com/vi/#{ videoId }/0.jpg"

subtitle = null
subtitle = "Youtube: #{comment}" if comment? and comment.length > 0
subtitle ||= videoUrl

message.content = @options.template({
videoId: videoId
videoId: videoId,
subtitle: subtitle
})
return Kandan.Helpers.Activities.buildFromMessageTemplate(message)

0 comments on commit b80f097

Please sign in to comment.