MailUtils.getExistingFolder fails for custom folder in TB V68

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MailUtils.getExistingFolder fails for custom folder in TB V68

bharath kumar
Hello,

We are migrating our legacy extension to TB v68.

As per https://wiki.mozilla.org/Thunderbird/Add-ons_Guide_63, we have renamed MailUtils.getFolderForUri to MailUtils.getExistingFolder.


However, this API does not work for the custom folder.

If the URI is mailbox://msk2%[hidden email]/Inbox, then it works.

But, if URI is mailbox://msk2%[hidden email]/Custom folder, then it does not work. It returns null.

Could you please help me here?

Thanks in Advance.

Thanks,
Regards,
Bharath
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: MailUtils.getExistingFolder fails for custom folder in TB V68

Jörg Knobloch
On 18 Oct 2019 14:34, bharath kumar wrote:
> As perhttps://wiki.mozilla.org/Thunderbird/Add-ons_Guide_63, we have renamed MailUtils.getFolderForUri to MailUtils.getExistingFolder.
>
>
> However, this API does not work for the custom folder.
>
> If the URI ismailbox://msk2%[hidden email]/Inbox, then it works.
>
> But, if URI ismailbox://msk2%[hidden email]/Custom  folder, then it does not work. It returns null.

The latest documentation can be found here:

https://developer.thunderbird.net/add-ons/tb68/changes

The mailbox: URIs you're presenting there are the "short form", usually
mailbox: URIs are more like a file: URI addressing the folder file. That
said, is there a space encoding issue? Should you be looking for
Custom%20folder?

Jörg.

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird