Add /omemo char command

This commit is contained in:
Paul Fariello
2019-04-10 06:49:20 +03:20
parent 0bc660400b
commit 277e8dc901
3 changed files with 25 additions and 1 deletions

View File

@@ -8050,6 +8050,25 @@ cmd_omemo_start(ProfWin *window, const char *const command, gchar **args)
#endif
}
gboolean
cmd_omemo_char(ProfWin *window, const char *const command, gchar **args)
{
#ifdef HAVE_OMEMO
if (args[1] == NULL) {
cons_bad_cmd_usage(command);
} else if (strlen(args[1]) != 1) {
cons_bad_cmd_usage(command);
} else {
prefs_set_omemo_char(args[1][0]);
cons_show("OMEMO char set to %c.", args[1][0]);
}
return TRUE;
#else
cons_show("This version of Profanity has not been built with OMEMO support enabled");
return TRUE;
#endif
}
gboolean
cmd_omemo_log(ProfWin *window, const char *const command, gchar **args)
{