jeevatkm/ReplyWithHeader-Thunderbird

3.1.0 Still doesn't find Owl based accounts

Closed this issue · 26 comments

Still working fine with IMAP, but in the settings dropdown for the addon, the Owl account still doesn't appear as a choice.
Replying to an Owl message defaults to TB's default quoting style.

TB 128.1 130+

@bleez99 I see, could you share steps to replicate at my end? it will be much easier to figure out the issue.

@bleez99 I have installed Owl add-on, its asking for office365 or exchange account, I do not have one.
I tried to configure my outlook.live.com account, its not working.

replywithheader-v3.1.1-debug.xpi.zip

Install this debug version. I have added this line console.log(account); in it.

Go to Add-ons Manager -> click on settings icon -> click Debug Add-ons -> look for RWH extension -> click inspect button -> you will get console window -> copy the all log lines and email to me

@bleez99 Did you get a chance to get me logs?

@bleez99 I just checked my emails once again, I didn't see any email regarding logs. Can you check my email address jeeva@myjeeva.com?

I replied directly to your email.  I'll try again tomorrow if I have time. 

I'm sorry, I do not have your direct email address. Also I do not recall sending any email directly to you.

Regardless, the debugging lines only revealed the IMAP and Local accounts. 

In TB 128 and above, this line of code should return all mail accounts regardless of the type -
https://github.com/jeevatkm/ReplyWithHeaderMozilla/blob/3023cbb22437383ade1362d2201d9f2445069b8b/modules/accounts.mjs#L25

Then, RWH uses the list to configure it. I have added the debug line after line 27 to log accounts individually.

I replied to the GitHub generated email from the issue I posted.

Typically, for this action, all the responses should be present in the issue—#167; however, I do not see them on the GitHub issue. You can validate it, too.

Please resend the link to your latest debug version.

Here you go - replywithheader-v3.1.1-debug.xpi.zip

@bleez99 Can you share debug log info?

@bleez99 Can you help with debug log?
As mentioned before, I do not have exchange or office 365 mail accounts, so I won't be able to test it at my end.

@bleez99 Can you help with debug log? As mentioned before, I do not have exchange or office 365 mail accounts, so I won't be able to test it at my end.

It looks like the function call doesn't return OWL accounts at all:

export async function all() {
    let accounts = await messenger.accounts.list();
    console.log("All accounts: ", accounts);
    let res = [];
    for (let account of accounts) {
        if (account.type === 'none') { continue };
        res.push({
            'id': account.id,
            'name': account.name,
            'type': account.type
        });
    }
    return res;
}

image

@bleez99 Can you help with debug log? As mentioned before, I do not have exchange or office 365 mail accounts, so I won't be able to test it at my end.

It looks like the function call doesn't return OWL accounts at all:

export async function all() {
    let accounts = await messenger.accounts.list();
    console.log("All accounts: ", accounts);
    let res = [];
    for (let account of accounts) {
        if (account.type === 'none') { continue };
        res.push({
            'id': account.id,
            'name': account.name,
            'type': account.type
        });
    }
    return res;
}

image

Some further investigation (not sure if this actually helps) but, OWL accounts show up when using the identities api:

    let identities = await messenger.identities.list();
    console.log("All identities: ", identities);
    let accountFromIdentity = await messenger.accounts.get(identities[0].accountId);
    console.log("Account from identity: ", accountFromIdentity);

However, it doesn't appear when you "get" the account...

I am completely new to thunderbird extension development so, I may be missing something... I would love to contribute if I was pushed in the right direction :)
image

@TGRHavoc Wow, thanks for your help.

Currently, RWH expects this line let accounts = await messenger.accounts.list(); to return all mail accounts.

If we get all accounts (including OWL) values mapped from identities API in the above function on your comment, we can make it work for all.

Would you like to attempt it? OR, if you can copy the complete console log lines as a string and give it to me, I will update the code flow, and you could help me test it. Let me know.

@TGRHavoc I'm sorry, I kind of jumped the gun with the implementation using your lead.

@TGRHavoc @bleez99 can you try this v3.2.0-dev version? I have changed the concept from account to identities across the RWH.

replywithheader-v3.2.0-dev.xpi.zip

@bleez99 Thanks for confirming, latest identity based implementation is working. Kindly update TB add-on review.
I do not know the history, I will look it up.

Thanks again @TGRHavoc for your analysis and input, which helped to resolve the unexpected behaviour of OWL accounts.

Thank you @bleez99