charlierguo/gmail — pull request #13 by pgwhalen (2013-08-20 18:10:24+00:00)
Title: Fetch full thread (sent and received) for a received message

I wanted the ability to fetch a full thread as it appears in the gmail interface (both sent and received), so I added fetch_thread() for a message. It caches the messages in the appropriate Mailbox.messages as well. It only works if called on a message that was sent to the user, not on a sent message. If there's interest I can make it more flexible. Perhaps a Thread object that wraps all emails? Maybe that's too much.

On another note, the idea of there being a current_mailbox for a Gmail object caused problems for me - that state can change in unpredictable ways. It seems to me that any function that involves a mailbox should somehow take an arg for it rather than change something that's hard to follow. I can make an issue and work on that too if you want.