feat: Add /force-encryption command and update message handling
All checks were successful
CI / Check spelling (pull_request) Successful in 18s
CI / Check coding style (pull_request) Successful in 34s
CI / Linux (ubuntu) (pull_request) Successful in 14m5s
CI / Linux (debian) (pull_request) Successful in 14m5s
CI / Linux (arch) (pull_request) Successful in 14m53s
All checks were successful
CI / Check spelling (pull_request) Successful in 18s
CI / Check coding style (pull_request) Successful in 34s
CI / Linux (ubuntu) (pull_request) Successful in 14m5s
CI / Linux (debian) (pull_request) Successful in 14m5s
CI / Linux (arch) (pull_request) Successful in 14m53s
Implement /force-encryption command to configure forced encryption settings with on|off and policy resend-to-confirm|block options. The changes enhance user experience by clarifying encryption requirements and providing actionable commands. Users can now press Enter again to confirm unencrypted messages in resend-to-confirm mode.
This commit is contained in:
@@ -2891,3 +2891,11 @@ cons_privacy_setting(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cons_encryption_setting(void)
|
||||
{
|
||||
cons_show("Force encryption : %sabled", prefs_get_boolean(PREF_FORCE_ENCRYPTION) ? "en" : "dis");
|
||||
|
||||
cons_show("Force encryption mode : %s", prefs_get_string(PREF_FORCE_ENCRYPTION_MODE));
|
||||
}
|
||||
|
||||
@@ -294,6 +294,14 @@ inp_get_line(void)
|
||||
return line;
|
||||
}
|
||||
|
||||
void
|
||||
inp_set_line(const char* const new_line)
|
||||
{
|
||||
rl_replace_line(new_line, 1);
|
||||
rl_point = rl_end;
|
||||
_inp_redisplay();
|
||||
}
|
||||
|
||||
char*
|
||||
inp_get_password(void)
|
||||
{
|
||||
|
||||
@@ -46,5 +46,6 @@ void inp_win_resize(void);
|
||||
void inp_put_back(void);
|
||||
char* inp_get_password(void);
|
||||
char* inp_get_line(void);
|
||||
void inp_set_line(const char* const new_line);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -351,6 +351,7 @@ void cons_theme_properties(void);
|
||||
void cons_theme_colours(void);
|
||||
void cons_show_tlscert(const TLSCertificate* cert);
|
||||
void cons_show_tlscert_summary(const TLSCertificate* cert);
|
||||
void cons_encryption_setting(void);
|
||||
|
||||
void cons_alert(ProfWin* alert_origin_window);
|
||||
void cons_remove_alert(ProfWin* window);
|
||||
|
||||
@@ -188,6 +188,7 @@ typedef struct prof_chat_win_t
|
||||
char* last_message;
|
||||
char* last_msg_id;
|
||||
gboolean has_attention;
|
||||
guint last_attempted_msg_hash;
|
||||
} ProfChatWin;
|
||||
|
||||
typedef struct prof_muc_win_t
|
||||
|
||||
@@ -164,6 +164,7 @@ win_create_chat(const char* const barejid)
|
||||
new_win->last_message = NULL;
|
||||
new_win->last_msg_id = NULL;
|
||||
new_win->has_attention = FALSE;
|
||||
new_win->last_attempted_msg_hash = 0;
|
||||
new_win->memcheck = PROFCHATWIN_MEMCHECK;
|
||||
|
||||
return &new_win->window;
|
||||
|
||||
Reference in New Issue
Block a user