GMail API:删除第一封电子邮件似乎会删除整个线程

I'm using the GMail API in Go(lang). After each email arrives I am 'inserting' (not sending an email onto the same thread (with stats about how many times you have communicated with this person etc etc...

What I want to end up with is the original incoming email trashed, and the inserted email first in the thread. The content of the original email is appended to the inserted email.

All works, except that when I trash the email with the ID of the original email, the entire thread disappears.

Is this because the appended email is inserted and not 'sent' to the thread? I wouldn't have thought so because it gets given a real messageID, so is it because I am trashing the first email in a thread, and that therefore trashes the whole thread?

I thought trashing should just trash the message, regardless of its 'ownership' of the thread. Thanks

You may refer with this post although the issue here is to retrieve the specific email within a thread. It stated that it is not currently possible because it is part of the email's body content and you're specifying the ID of the message to trash. You can only trash other messages within a thread, but not the primary message since the messageId and the threadId of the first email is the same. Yes, using the Gmail App it's working, but I think it is not yet supported using the API. You can file a feature request for this.