Permalink
Browse files

Updating normalizeMessageLink to work with multiple accounts

Using string substitutions to produce a URL with this form: https://mail.google.com/mail/b/[account_id]/#inbox/[message_id]
  • Loading branch information...
1 parent 7c8be99 commit f64db4036cefa50c205a5e2d1d3f3a2fbb5d0d23 @sschwartzman sschwartzman committed Aug 6, 2013
Showing with 8 additions and 6 deletions.
  1. +8 −6 Classes/GNChecker.rb
View
@@ -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 f64db40

Please sign in to comment.