From dba622b2f718abbb808d1495bff38217c45f3f11 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Mon, 29 Dec 2014 11:17:03 -0800 Subject: [PATCH] fix notification text for "...that linked to..." --- helpers/webmention_processor.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/webmention_processor.rb b/helpers/webmention_processor.rb index 0f10a44..3aba6ec 100644 --- a/helpers/webmention_processor.rb +++ b/helpers/webmention_processor.rb @@ -106,14 +106,14 @@ def process_mention(username, source, target, protocol) elsif repost_of = get_referenced_url(entry, 'repost_of') or repost_of = get_referenced_url(entry, 'repost') phrase = (twitter ? 'retweeted a tweet' : 'reshared a post') - if (repost_of.respond_to? :include and !repost_of.include? target) or repost_of.to_s != target + if repost_of.respond_to? :include and !repost_of.include? target phrase += " that linked to" end link.type = "repost" elsif like_of = get_referenced_url(entry, 'like_of') or like_of = get_referenced_url(entry, 'like') phrase = (twitter ? 'favorited a tweet' : gplus ? '+1ed a post' : 'liked a post') - if (like_of.respond_to? :include and !like_of.include? target) or like_of.to_s != target + if like_of.respond_to? :include and !like_of.include? target phrase += " that linked to" end link.type = "like" @@ -124,7 +124,7 @@ def process_mention(username, source, target, protocol) else phrase = "commented '#{snippet}' on a post" end - if (in_reply_to.respond_to? :include and !in_reply_to.include? target) or in_reply_to.to_s != target + if in_reply_to.respond_to? :include and !in_reply_to.include? target puts "in reply to URL is different from the target: #{in_reply_to}" phrase += " that linked to" end