only show the url when the post has photos

This commit is contained in:
maxwell 2010-12-04 11:58:34 -08:00
parent f22289ae0a
commit 544ab993ac

View file

@ -169,7 +169,8 @@ class User
if post.public && post.respond_to?(:message)
if opts[:url]
if opts[:url] && post.photos.count > 0
message = truncate(post.message, :length => (140 - (opts[:url].length + 1)))
message = "#{message} #{opts[:url]}"
else