Comments (24)
@johndbritton It's a known issue. I haven't found a fix.
I've tried possible ways to construct the target URL for a message, but none brings me to the proper account.
If you find out how the final URL should be like, then we only need to change this one method:
https://github.com/ashchan/gmail-notifr-objc/blob/master/Classes/GNChecker.m#L166
Thanks
from mail-notifr.
The link format is like this:
https://mail.google.com/mail/u/[account_id]/#inbox/[message_id]
Root: https://mail.google.com/mail
Account id: /u/[account_id], where [account_id] identifies which account you're accessing (mine are 0, 1, 2)
Message: /#inbox/[message_id]
from mail-notifr.
I don't think we have idea from the app what account_ids are.
If I sign out my accounts then sign in again, the first account signed in becomes 0.
from mail-notifr.
More worse, Gmail fools us by offering a message link to a 404 page from the feed atom:
http://mail.google.com/[email protected]&message_id=13da9861b9a14aca&view=conv&extsrc=atom
If I remove view-conv&extsrc=atom parameters, it does go to a existing page, but still in the wrong account.
from mail-notifr.
as far as I know, account_id is dependent upon the order in which you log in to the different accounts. I don't know that there's an easy way to route to the correct account.
from mail-notifr.
True. I'll invest more time on this later. I totally agree it's a bug that we need to fix.
from mail-notifr.
Hey. Thanks for this awesome project.
I have email adresses on multiple Google Apps Domains and the fixed attached fixes opening email in every domain. As noted in the PR message it likely won't work for multiple accounts on the same domain - sorry.
from mail-notifr.
@mschae Thanks for the contribution!
I'm testing the fix. For one of my Apps Domains, it constructs the final message link as:
http://mail.google.com/a/example.com#inbox/[email protected]&message_id=13ddab3d40731f55&view=conv&extsrc=atom
But it doesn't open the specified message. Instead it only goes to the inbox list.
Note: my accounts are from different domains.
from mail-notifr.
Same problem here!
from mail-notifr.
Sorry about that. It's weird - it does work for me like that.
I wonder if its a browser specific problem (no forwarding of hash on 302s) or if you have different inbox settings. What if you replace #inbox with #all?
from mail-notifr.
@mschae What browser do you use? I mostly use Safari. Will test #inbox/#all later.
from mail-notifr.
I am using Chrome and you are right - it does not work in Safari.
Best guess right now is that Safari doesn't forward hashes on 302 status codes and Chrome does. Damnit. Sorry that I only tested it in Chrome.
Good news is we have a fix for Chrome ;-)
from mail-notifr.
@mschae Thus I'll merge it. Fix for one browser is better than fix for none. Thanks!
from mail-notifr.
Thank you!
I did some research and it does look like Firefox and Chrome forward it: http://stackoverflow.com/questions/5283395/url-hash-is-persisting-between-redirects
Safari unfortunately doesn't although one could argue that forwarding the hash is the right thing to do (see first reply's analogy).
from mail-notifr.
The Stack Overflow question is very helpful and educational. Thanks a lot!
from mail-notifr.
Hi All,
I think I've found a URL that works as a fix for this:
http://mail.google.com/mail/b/[account_id]/#inbox/[message_id]
For example:
http://mail.google.com/mail/b/[email protected]/#inbox/1234567a890bc123
I've tried this with emails from multiple accounts, including those with other domains (my employer uses corporate GMail). Thus far it seems to work every time, and no matter which account I have open on my screen (it'll switch to the right one).
I forked the Ruby version and made an update to the normalizeMessageLink method such that it produces a URL in this form. Could you incorporate this change into the ObjC build (if it works for you there)?
Thanks,
Seth
from mail-notifr.
@sschwartzman This is very helpful! I'll update to try it. Thank you so much!
from mail-notifr.
@sschwartzman It doesn't work for me (on Safari), same problem as before. Are you using Safari?
from mail-notifr.
Using Chrome, didn't think to try Safari. :) You're right, it doesn't look
like it works for Safari. Damn.
Can you still include it for when Chrome is selected as your browser?
from mail-notifr.
@sschwartzman Only Safari has this issue. The current logic (fixed a few months back) works for Chrome and Firefox.
from mail-notifr.
Are you sure about that? It doesn't work for me in Chrome or Firefox with
the current version (0.8.0). A desktop build I did of it today with a quick
hack to the "normalizeLink" method made it work properly in Chrome.
On Tue, Aug 6, 2013 at 8:01 PM, James Chen [email protected] wrote:
@sschwartzman https://github.com/sschwartzman Only Safari has this
issue. The current logic (fixed a few months back) works for Chrome and
Firefox.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-22221000
.
from mail-notifr.
Are you running the version built from codebase or from public download? It's fixed in codebase but not released yet.
from mail-notifr.
I don't know what's in the App Store version (I'm currently running 1.0.1 (136)), but this problem still persists for me in Chrome and Safari.
from mail-notifr.
@janeylicious This feature has become totally miserable! 1.0.1 has the fix. For myself, Chrome works properly; Safari works well from time to time but usually it just goes to the inbox list.
Google seems to rolled out sign in related changes quite often. With their account page feature (list all your google accounts) sometimes I cannot even open inbox for a logged in account and have to log out all accounts.
So, sorry if it doesn't work. I still don't have a fantastic fix for this issue yet.
from mail-notifr.
Related Issues (20)
- No podspec exists at path HOT 2
- Not working on OS X El Capitan Developer Beta 3 HOT 1
- Does't work in OS X 10.11 (El Capitan) public beta HOT 2
- The application 'Google Chrome' is not open anymore. HOT 2
- Add support for Gmail OAuth login (not password) HOT 7
- 2.0.0 TODO HOT 1
- Sound is played even if there's no new messages HOT 1
- Account gone after restart HOT 11
- Feature request: sort the accounts HOT 4
- Menu bar icon is slightly lower than it should be HOT 4
- Email opens inside "All mail" folder instead of "Inbox" folder HOT 3
- Opening inbox or email in Safari creates a new Safari window HOT 1
- Open in browser setting does not work for Safari HOT 4
- Allow user to set which Google account to use for each Notifr account
- Where's version 1.3.5? HOT 1
- FEATURE: Option for hiding app icon in dock HOT 1
- Improvement: Nicer menubar icons HOT 2
- Mailto handler is not working
- Google: Use of Restricted Gmail API scopes may require additional verification steps
- Notification text contains HTML entities
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mail-notifr.