remove soft disable flag when attempting call

This commit is contained in:
Daniel Gultsch 2023-10-18 18:18:16 +02:00
parent f042efd550
commit 69425e677c
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
2 changed files with 7 additions and 0 deletions

View file

@ -258,6 +258,9 @@ public class Account extends AbstractEntity implements AvatarService.Avatarable
}
public boolean setOption(final int option, final boolean value) {
if (value && (option == OPTION_DISABLED || option == OPTION_SOFT_DISABLED)) {
this.setStatus(State.OFFLINE);
}
final int before = this.options;
if (value) {
this.options |= 1 << option;

View file

@ -1609,6 +1609,10 @@ public class ConversationFragment extends XmppFragment
.show();
return;
}
final Account account = conversation.getAccount();
if (account.setOption(Account.OPTION_SOFT_DISABLED, false)) {
activity.xmppConnectionService.updateAccount(account);
}
final Contact contact = conversation.getContact();
if (RtpCapability.jmiSupport(contact)) {
triggerRtpSession(contact.getAccount(), contact.getJid().asBareJid(), action);