diff options
author | James Booth <boothj5@gmail.com> | 2016-08-18 00:10:15 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-08-18 00:10:15 +0100 |
commit | 4de570b1ee34bad2e7565df6a426e497485a5708 (patch) | |
tree | 928fbaa7ff94457654862da284a532355fc5c48c /src/command | |
parent | 41acaee9558c4989bebdd99b3f3c577715db756c (diff) | |
download | profani-tty-4de570b1ee34bad2e7565df6a426e497485a5708.tar.gz |
Only include receipts feature in disco responses when enabled
issue #829
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/cmd_funcs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 342d38d5..ede549b4 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -5987,6 +5987,12 @@ cmd_receipts(ProfWin *window, const char *const command, gchar **args) { if (g_strcmp0(args[0], "send") == 0) { _cmd_set_boolean_preference(args[1], command, "Send delivery receipts", PREF_RECEIPTS_SEND); + if (g_strcmp0(args[1], "on") == 0) { + caps_add_feature(XMPP_FEATURE_RECEIPTS); + } + if (g_strcmp0(args[1], "off") == 0) { + caps_remove_feature(XMPP_FEATURE_RECEIPTS); + } } else if (g_strcmp0(args[0], "request") == 0) { _cmd_set_boolean_preference(args[1], command, "Request delivery receipts", PREF_RECEIPTS_REQUEST); } else { |