event on draft saved

52 views
Skip to first unread message

Ori

unread,
Apr 30, 2017, 9:38:14 AM4/30/17
to InboxSDK
Hey ,I need to change the draft every time he is changed ,I mean to encrypt the draft until user send it... So I am looking for event that will fire every time gmail save the mail to the draft and then to change it every time...
I see the event of  composeView.getDraftID().then(draftID  but it's happens only first time gmail save the draft , and not every time the draft is change by user input...

Can I do something about it ? I found this event in gmail.js library on GitHub but it's seems like it's doesn't work together...

Thanks all!!

Ajay Goel

unread,
May 7, 2017, 12:31:46 PM5/7/17
to InboxSDK
I am also interested in a solution to this. Is there a method that forces the Draft to save and generate a new MessageID. The reason I need this is because I'm using a ComposeView button that passes the DraftID to some code which processes the message and then closes the ComposeView. But if the user has just made a change to the Message area, the Draft may not be saved yet, and so my backend code which calls the Gmail API may be pulling an old version of the Draft's contents. Also there are some instances of making a change to the Compose window that doesn't force Gmail to save that change and generate a new Message ID until the ComposeView is closed. For example, if you have multiple From Addresses set up in your account, and you choose a different From Address from the dropdown, that change isn't saved in the Draft until you also make *one other change* afterwards to the Message.
Reply all
Reply to author
Forward
0 new messages