Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit f64db4036cefa50c205a5e2d1d3f3a2fbb5d0d23 1 parent 7c8be99
Seth Schwartzman sschwartzman authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 Classes/GNChecker.rb
14 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
Please sign in to comment.
Something went wrong with that request. Please try again.