KartikTalwar / gmail.js

Gmail JavaScript API
MIT License
3.76k stars 457 forks source link

why isn't gmail.new.get.thread_data() reliable? #670

Open DonaldBatryn opened 2 years ago

DonaldBatryn commented 2 years ago

Is there any way to ensure this returns a response other than undefined? it never seems available when i need it

josteink commented 2 years ago

gmail.new.get,thread_data() is only "guaranteed" to contain data for a thread which has been in view somehow, or was preloaded during Gmail-launch, and with gmail.js injected early enough to intercept this data.

If you want to "guarantee" that you have the relevant thread-data, you need to:

That's about it. Is your extension within these bounds?