From 793f564ffd9622e2c879b1ee3591748d602d6118 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 27 Feb 2020 02:36:32 -0500 Subject: Support CAP LS 302 from clients --- bounce.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bounce.h') diff --git a/bounce.h b/bounce.h index 1655772..5aff027 100644 --- a/bounce.h +++ b/bounce.h @@ -87,7 +87,9 @@ enum Cap { #define X(name, id) BIT(id), ENUM_CAP #undef X - TagCaps = CapAccountTag + CapBits, + TagCaps = 0 + | CapAccountTag | CapBatch | CapLabeledResponse | CapMessageTags @@ -118,13 +120,17 @@ static inline enum Cap capParse(const char *list) { return caps; } -static inline const char *capList(enum Cap caps) { +static inline const char *capList(enum Cap caps, const char *values[CapBits]) { static char buf[1024]; buf[0] = '\0'; for (size_t i = 0; i < ARRAY_LEN(CapNames); ++i) { if (caps & (1 << i)) { if (buf[0]) strlcat(buf, " ", sizeof(buf)); strlcat(buf, CapNames[i], sizeof(buf)); + if (values && values[i]) { + strlcat(buf, "=", sizeof(buf)); + strlcat(buf, values[i], sizeof(buf)); + } } } return buf; -- cgit 1.4.1