Don't forget encryption status for OX and PGP.

Use a pgp.enabled and ox.enabled array the same way that omemo.enabled
is used.

Fixes https://github.com/profanity-im/profanity/issues/1694
Fixes https://github.com/profanity-im/profanity/issues/733
This commit is contained in:
MarcoPolo-PasTonMolo
2022-06-17 15:43:54 +03:00
parent 476c73251c
commit e4e53d6e01
12 changed files with 161 additions and 39 deletions

View File

@@ -7475,6 +7475,7 @@ cmd_pgp(ProfWin* window, const char* const command, gchar** args)
}
chatwin->pgp_send = TRUE;
accounts_add_pgp_state(session_get_account_name(), chatwin->barejid, TRUE);
win_println(window, THEME_DEFAULT, "!", "PGP encryption enabled.");
return TRUE;
}
@@ -7498,6 +7499,7 @@ cmd_pgp(ProfWin* window, const char* const command, gchar** args)
}
chatwin->pgp_send = FALSE;
accounts_add_pgp_state(session_get_account_name(), chatwin->barejid, FALSE);
win_println(window, THEME_DEFAULT, "!", "PGP encryption disabled.");
return TRUE;
}
@@ -7673,6 +7675,7 @@ cmd_ox(ProfWin* window, const char* const command, gchar** args)
}
chatwin->is_ox = TRUE;
accounts_add_ox_state(session_get_account_name(), chatwin->barejid, TRUE);
win_println(window, THEME_DEFAULT, "!", "OX encryption enabled.");
return TRUE;
} else if (g_strcmp0(args[0], "end") == 0) {
@@ -7688,6 +7691,7 @@ cmd_ox(ProfWin* window, const char* const command, gchar** args)
win_println(window, THEME_DEFAULT, "!", "No OX session has been started.");
} else {
chatwin->is_ox = FALSE;
accounts_add_ox_state(session_get_account_name(), chatwin->barejid, FALSE);
win_println(window, THEME_DEFAULT, "!", "OX encryption disabled.");
}
return TRUE;