Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gmail.new.get.thread_data() always returning null or undefined #762

Open
Georg7 opened this issue Aug 12, 2023 · 1 comment
Open

gmail.new.get.thread_data() always returning null or undefined #762

Georg7 opened this issue Aug 12, 2023 · 1 comment

Comments

@Georg7
Copy link

Georg7 commented Aug 12, 2023

I've preloaded gmail.js and have a valid thread_id (user is viewing the thread). When I call gmail.new.get.thread_data(threadId) it always returns null or undefined.

Gmail.js is preloaded similarly to how it's demonstrated in the boilerplate https://github.com/josteink/gmailjs-node-boilerplate/blob/master/src/extension.js#L4

 gmail.observe.on("view_thread", function (obj) {

      const threadId = gmail.new.get.thread_id();

      const threadData = gmail.new.get.thread_data(threadId);
      console.log(threadData);
    });
@josteink
Copy link
Collaborator

I've tried to reproduce on my machine, but it seems to work for me. Without reproducing, it's hard to tell what's wrong.

Using the boilerplate repo, what does Object.keys(gmail.cache.threadCache).length say if you try it in a web console after loading Gmail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants