Code Monkey home page Code Monkey logo

Comments (24)

ashchan avatar ashchan commented on June 12, 2024

@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.

johndbritton avatar johndbritton commented on June 12, 2024

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.

ashchan avatar ashchan commented on June 12, 2024

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.

ashchan avatar ashchan commented on June 12, 2024

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.

johndbritton avatar johndbritton commented on June 12, 2024

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.

ashchan avatar ashchan commented on June 12, 2024

True. I'll invest more time on this later. I totally agree it's a bug that we need to fix.

from mail-notifr.

mschae avatar mschae commented on June 12, 2024

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.

ashchan avatar ashchan commented on June 12, 2024

@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.

javiercr avatar javiercr commented on June 12, 2024

Same problem here!

from mail-notifr.

mschae avatar mschae commented on June 12, 2024

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.

ashchan avatar ashchan commented on June 12, 2024

@mschae What browser do you use? I mostly use Safari. Will test #inbox/#all later.

from mail-notifr.

mschae avatar mschae commented on June 12, 2024

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.

ashchan avatar ashchan commented on June 12, 2024

@mschae Thus I'll merge it. Fix for one browser is better than fix for none. Thanks!

from mail-notifr.

mschae avatar mschae commented on June 12, 2024

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.

ashchan avatar ashchan commented on June 12, 2024

The Stack Overflow question is very helpful and educational. Thanks a lot!

from mail-notifr.

sschwartzman avatar sschwartzman commented on June 12, 2024

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.

ashchan avatar ashchan commented on June 12, 2024

@sschwartzman This is very helpful! I'll update to try it. Thank you so much!

from mail-notifr.

ashchan avatar ashchan commented on June 12, 2024

@sschwartzman It doesn't work for me (on Safari), same problem as before. Are you using Safari?

from mail-notifr.

sschwartzman avatar sschwartzman commented on June 12, 2024

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.

ashchan avatar ashchan commented on June 12, 2024

@sschwartzman Only Safari has this issue. The current logic (fixed a few months back) works for Chrome and Firefox.

from mail-notifr.

sschwartzman avatar sschwartzman commented on June 12, 2024

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.

ashchan avatar ashchan commented on June 12, 2024

Are you running the version built from codebase or from public download? It's fixed in codebase but not released yet.

from mail-notifr.

janeylicious avatar janeylicious commented on June 12, 2024

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.

ashchan avatar ashchan commented on June 12, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.