mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Added /receipts command
This commit is contained in:
parent
b21edfaa51
commit
2762f18a3e
@ -921,6 +921,15 @@ static struct cmd_t command_defs[] =
|
||||
"The message carbons feature ensures that both sides of all conversations are shared with all the user's clients that implement this protocol.",
|
||||
NULL } } },
|
||||
|
||||
{ "/receipts",
|
||||
cmd_receipts, parse_args, 1, 1, &cons_receipts_setting,
|
||||
{ "/reciepts on|off", "Message delivery receipts.",
|
||||
{ "/reciepts on|off",
|
||||
"----------------",
|
||||
"Enable or disable message delivery receipts.",
|
||||
"The user interface will indicate when a message has been received.",
|
||||
NULL } } },
|
||||
|
||||
{ "/reconnect",
|
||||
cmd_reconnect, parse_args, 1, 1, &cons_reconnect_setting,
|
||||
{ "/reconnect seconds", "Set reconnect interval.",
|
||||
@ -2020,7 +2029,7 @@ _cmd_complete_parameters(const char * const input)
|
||||
// autocomplete boolean settings
|
||||
gchar *boolean_choices[] = { "/beep", "/intype", "/states", "/outtype",
|
||||
"/flash", "/splash", "/chlog", "/grlog", "/mouse", "/history",
|
||||
"/vercheck", "/privileges", "/presence", "/wrap", "/carbons" };
|
||||
"/vercheck", "/privileges", "/presence", "/wrap", "/carbons", "/receipts" };
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(boolean_choices); i++) {
|
||||
result = autocomplete_param_with_func(input, boolean_choices[i], prefs_autocomplete_boolean_choice);
|
||||
|
@ -3938,6 +3938,13 @@ cmd_carbons(gchar **args, struct cmd_help_t help)
|
||||
return result;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_receipts(gchar **args, struct cmd_help_t help)
|
||||
{
|
||||
return _cmd_set_boolean_preference(args[0], help,
|
||||
"Message delivery receipts", PREF_RECEIPTS);
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_away(gchar **args, struct cmd_help_t help)
|
||||
{
|
||||
|
@ -86,6 +86,7 @@ gboolean cmd_group(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_help(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_history(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_carbons(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_receipts(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_info(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_intype(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_invite(gchar **args, struct cmd_help_t help);
|
||||
|
@ -1196,6 +1196,15 @@ cons_carbons_setting(void)
|
||||
cons_show("Message carbons (/carbons) : OFF");
|
||||
}
|
||||
|
||||
void
|
||||
cons_receipts_setting(void)
|
||||
{
|
||||
if (prefs_get_boolean(PREF_RECEIPTS))
|
||||
cons_show("Message receipts (/reciepts) : ON");
|
||||
else
|
||||
cons_show("Message receipts (/receipts) : OFF");
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_chat_prefs(void)
|
||||
{
|
||||
|
@ -318,6 +318,7 @@ void cons_intype_setting(void);
|
||||
void cons_gone_setting(void);
|
||||
void cons_history_setting(void);
|
||||
void cons_carbons_setting(void);
|
||||
void cons_receipts_setting(void);
|
||||
void cons_log_setting(void);
|
||||
void cons_chlog_setting(void);
|
||||
void cons_grlog_setting(void);
|
||||
|
@ -468,6 +468,7 @@ void cons_intype_setting(void) {}
|
||||
void cons_gone_setting(void) {}
|
||||
void cons_history_setting(void) {}
|
||||
void cons_carbons_setting(void) {}
|
||||
void cons_receipts_setting(void) {}
|
||||
void cons_log_setting(void) {}
|
||||
void cons_chlog_setting(void) {}
|
||||
void cons_grlog_setting(void) {}
|
||||
|
Loading…
Reference in New Issue
Block a user