cleidigh / ThunderKdB

Thunderbird Addon Code Knowledge Base
11 stars 7 forks source link

How do I obtain the body of a message, given its URI? #43

Closed eyalroz closed 1 year ago

eyalroz commented 1 year ago

In my extension, I have some very old code which using sync-stream-listener and scriptableinputstream to read the body of a message, given its URI. Since that code was in fashion, sync-stream-listener has been deprecated... Mozilla bug 1800606. How should I obtain a message's body these days?

cleidigh commented 1 year ago

@eyalroz I think you want the wext API call getFull, not sure what is the best way to get uri to id. @cleidigh

eyalroz commented 1 year ago

@cleidigh : I'm not looking for a WE wrapper, I'm asking how I do it in regular TB JS code / in a regular extension. Right now, I'm doing it this way, with a stream listener etc. I was hoping maybe over the years the underlying infrastructure had evolved so that once can synchronously get a message body with relative ease...

cleidigh commented 1 year ago

@eyalroz That is the new (and easy}, don't know alternative. @cleidigh

eyalroz commented 1 year ago

Thanks... too bad, I hoped 15 years had seen some work on this.