Wrong thread Id when replying to a conversation in the new Gmail UI

698 views
Skip to first unread message

bjo...@cirruspath.com

unread,
Mar 13, 2018, 2:18:09 PM3/13/18
to InboxSDK
Hi. I have a question about using InboxSDK with the upcoming Gmail UI changes. I've noticed that when I reply to a message in a thread the wrong thread id is being returned from getThreadId(). The thread id returned is always the thread id of the first message.

I've included a screenshot of the XHR request (wrong-thread-id.png) that shows the response when the message is sent. You can see that the threadId returned is 1622069bd2aef98d but I was expecting the thread Id to be 162206a0873a52b9. After the message is sent I can inspect the DOM and see that Google has 162206a0873a52b9 as the data-legacy-message-id attribute (correct-thread-in-dom.png).

This works fine in the  current Gmail UI and is only a problem with the new Gmail UI.


        sdk.Compose.registerComposeViewHandler(composeView => {
            composeView.on('sent', event => {
                $q.all([event.getMessageID(), event.getThreadID()])
                    .then(result => {
                        let messageId = result[0];
                        let threadId = result[1];
                        console.log('*** messageId', messageId);
                        console.log('*** threadId', threadId);
                    });
            });
        });
wrong-thread-id.png
correct-thread-in-dom.png

Aleem Mawani

unread,
Mar 13, 2018, 2:24:57 PM3/13/18
to bjo...@cirruspath.com, InboxSDK
Thanks for the detailed report, we'll be taking a look at this today.


--
You received this message because you are subscribed to the Google Groups "InboxSDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inboxsdk/4f4b5b70-4a23-4c16-8cdd-3112c673d63a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bjo...@cirruspath.com

unread,
Mar 13, 2018, 2:58:04 PM3/13/18
to InboxSDK
I should point out that it's the message id that is wrong not the thread id. The message id should be the message id of the message that was just sent. Instead InboxSDK getMessageId() is always returning the message id of the first message in the thread (which is the same as the thread id).

Omar Ismail

unread,
Apr 16, 2018, 6:54:54 PM4/16/18
to bjo...@cirruspath.com, InboxSDK
This issue is now fixed. Thanks for the bug report!

--
You received this message because you are subscribed to the Google Groups "InboxSDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+u...@googlegroups.com.

Yoni Bazak

unread,
May 1, 2018, 10:39:58 AM5/1/18
to InboxSDK
Hi,
I hope I in the right subject.
I just wonder how I can locate the thread id in the new gmail links
Old gmail is very easy:  https://mail.google.com/mail/u/0/#inbox/1630209116a3af45 and thread id is: 1630209116a3af45 
In the new gmail same thread link is: https://mail.google.com/mail/u/0/?zx=3xcdey2cogvc#inbox/FMfcgxmZVPbZvwJWCvBMvjxglSMPvsvW and is no option to find it
I also find the source of the page and the thread id is not there
I also try to find in the "show original" option, but I can find only the message id, and it not help
How can I locate the thread id in new gmail

Omar Ismail

unread,
May 1, 2018, 6:48:40 PM5/1/18
to yba...@gmail.com, InboxSDK
Use the SDK to get the thread id :)

Yoni Bazak

unread,
May 2, 2018, 4:59:41 AM5/2/18
to InboxSDK
My qustion is how I can locate the thread id by using the url or similar way, not by using software
Thanks!!

Omar Ismail

unread,
May 3, 2018, 7:32:00 PM5/3/18
to Yoni Bazak, InboxSDK
If you pop out the thread into a separate window then the new window will have the thread id in the address bar. Note, this url is the new "sync" style id and doesn't yet work with the Gmail API.

Yoni Bazak

unread,
May 9, 2018, 5:52:29 AM5/9/18
to om...@streak.com, inbo...@googlegroups.com
Thanks Omar.
This is any option to snooze emails via Gmail API?
Thanks


photo
Yoni Bazak
CTO at QuietLife Technologies
 9 Bet Hadfus St, Jerusalem IL
 972.2.996.3388   yo...@quietlife.tech   http://quietlife.tech 


Omar Ismail

unread,
May 9, 2018, 12:59:32 PM5/9/18
to Yoni Bazak, InboxSDK
Not that I know of.

Yoni Bazak

unread,
May 10, 2018, 6:58:07 AM5/10/18
to Omar Ismail, inbo...@googlegroups.com
This is any plan to add it?


photo
Yoni Bazak
CTO at QuietLife Technologies
 9 Bet Hadfus St, Jerusalem IL
 972.2.996.3388   yo...@quietlife.tech   http://quietlife.tech 


Yoni Bazak

unread,
May 15, 2018, 1:58:26 PM5/15/18
to Omar Ismail, inbo...@googlegroups.com
Hi Omar, this is any plan to add snooze to the sdk?
Thanks


photo
Yoni Bazak
CTO at QuietLife Technologies
 9 Bet Hadfus St, Jerusalem IL
 972.2.996.3388   yo...@quietlife.tech   http://quietlife.tech 


Aleem Mawani

unread,
May 15, 2018, 2:23:10 PM5/15/18
to yba...@gmail.com, Omar Ismail, InboxSDK
At the moment there are no plans to do this.

Rodney Kuhn

unread,
Jun 19, 2018, 11:19:09 AM6/19/18
to InboxSDK
Hi Omar,

Thank you for the great work you and the team have been doing.  InboxSDK is truly amazing!

I was wondering if is possible to retrieve the able to new "sync" style id that you refer to, through InboxSDK?  Or if not, could you perhaps recommend that you could find such an id?  I'm also interested know if you know if Gmail plans to support opening a thread via the URL (with the thread-id appended).  One of their recent documents seemed to suggest it may not be around for much longer. 

I guess the more developers that require this, the better the chances that this feature might stay in.

Best regards,

Rod

Jared Sohn

unread,
Jun 19, 2018, 10:17:21 PM6/19/18
to InboxSDK
I'm wondering if there was a regression for this bug? I think we're experiencing something similar. Our scenario is that when we send a draft, getMessageID() returns the message id from before it was sent (which matches the thread id) instead of the message id for the sent message. This happens only in the new gmail UI for us as well.

Jared Sohn

unread,
Jul 6, 2018, 2:43:55 PM7/6/18
to InboxSDK
Bumping this. Let me know if you need more information to check this (but I think the original post from this thread may have sufficient information.)
Reply all
Reply to author
Forward
0 new messages