not sking messagesTagsList permission for thunderbird 115. see #281

This commit is contained in:
mic 2025-03-05 21:29:56 +01:00
parent e1d97cfc5c
commit 3313e9cd45
2 changed files with 5 additions and 7 deletions

View file

@ -110,12 +110,7 @@ export class mzta_Menus {
let chatgpt_lang = await taPromptUtils.getDefaultLang(curr_prompt);
let fullPrompt = '';
let tags_full_list = '';
// without the tags related permissions, we can't get the tags list
if(await browser.permissions.contains({permissions: ['messagesTagsList']})){
tags_full_list = await getTagsList();
}
let tags_full_list = await getTagsList();
let curr_messages = null;
switch(tabs[0].type){

View file

@ -205,7 +205,10 @@ export function generateCallID(length = 10) {
export async function getTagsList(){
let messageTags = {};
if(await isThunderbird128OrGreater()) {
messageTags = await browser.messages.tags.list();
// without the tags related permissions, we can't get the tags list
if(await browser.permissions.contains({permissions: ['messagesTagsList']})){
messageTags = await browser.messages.tags.list();
}
} else {
messageTags = await browser.messages.listTags();
}