Browse files

Merge pull request #48 from sschwartzman/patch-1

Updating normalizeMessageLink to work with multiple accounts
  • Loading branch information...
2 parents 7c8be99 + f64db40 commit 6d2a5c04d48755ba988b75902d08e918d0963711 @ashchan committed Aug 6, 2013
Showing with 8 additions and 6 deletions.
  1. +8 −6 Classes/GNChecker.rb
View
14 Classes/GNChecker.rb
@@ -249,12 +249,14 @@ def cleanupAndQuit
private
def normalizeMessageLink(link)
- if @account.username.include?("@")
- domain = @account.username.split("@")[1]
- if domain != "gmail.com" && domain != "googlemail.com"
- link = link.gsub("/mail?", "/a/#{domain}/?")
- end
- end
+ link = link.gsub("/mail?account_id=", "/mail/b/")
+ link = link.gsub("&message_id=", "/#inbox/")
+ #if @account.username.include?("@")
+ # domain = @account.username.split("@")[1]
+ # if domain != "gmail.com" && domain != "googlemail.com"
+ # link = link.gsub("/mail?", "/a/#{domain}/?")
+ # end
+ #end
link
end

0 comments on commit 6d2a5c0

Please sign in to comment.