Fixed auth update of Outlook shared mailbox

This commit is contained in:
M66B 2022-10-12 19:40:34 +02:00
parent c2a53562e0
commit 86ac86b8b2
1 changed files with 3 additions and 3 deletions

View File

@ -788,7 +788,7 @@ public class FragmentOAuth extends FragmentBase {
if (pop && recent && "gmail".equals(id))
username = "recent:" + username;
Log.i("OAuth username=" + username);
Log.i("OAuth username=" + username + " shared=" + sharedname);
for (Pair<String, String> identity : identities)
Log.i("OAuth identity=" + identity.first + "/" + identity.second);
@ -835,7 +835,7 @@ public class FragmentOAuth extends FragmentBase {
db.beginTransaction();
if (args.getBoolean("update")) {
List<EntityAccount> accounts = db.account().getAccounts(username, protocol);
List<EntityAccount> accounts = db.account().getAccounts(sharedname == null ? username : sharedname, protocol);
if (accounts != null && accounts.size() == 1)
update = accounts.get(0);
}
@ -936,7 +936,7 @@ public class FragmentOAuth extends FragmentBase {
EntityLog.log(context, "OAuth update account=" + update.name);
db.account().setAccountSynchronize(update.id, true);
db.account().setAccountPassword(update.id, state, AUTH_TYPE_OAUTH, provider.id);
db.identity().setIdentityPassword(update.id, update.user, state, update.auth_type, AUTH_TYPE_OAUTH, provider.id);
db.identity().setIdentityPassword(update.id, username, state, update.auth_type, AUTH_TYPE_OAUTH, provider.id);
}
db.setTransactionSuccessful();