diff options
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | include/AnnotationTypes.hpp | 1 | ||||
-rw-r--r-- | src/main.cpp | 5 |
3 files changed, 6 insertions, 3 deletions
@@ -59,5 +59,8 @@ The text should be printed as strikethrough. No extra content. ##### `underline` The text should be printed as underline. No extra content. +##### `command` +The text should be printed as a command, meaning how did bridge will recognize it (e.g. prefix with '/'). No extra content. + ##### `link` The text should be formatted as a link. Extra content: the alt text for the uri - the uri should be the text itself, so that clients ignoring this annotation still show the real uri.
\ No newline at end of file diff --git a/include/AnnotationTypes.hpp b/include/AnnotationTypes.hpp index d61de08..66d0b9d 100644 --- a/include/AnnotationTypes.hpp +++ b/include/AnnotationTypes.hpp @@ -16,6 +16,7 @@ namespace Reply { DECL_ENUM_ELEMENT(italics), DECL_ENUM_ELEMENT(strikethrough), DECL_ENUM_ELEMENT(underline), + DECL_ENUM_ELEMENT(command), DECL_ENUM_ELEMENT(link), } END_ENUM(AnnotationType) } diff --git a/src/main.cpp b/src/main.cpp index a61a3dd..a86c589 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,7 +19,7 @@ struct CommandHandler { } handler_function func{nullptr}; - [[maybe_unused]] std::string description; + std::string description; void *payload{nullptr}; }; @@ -124,8 +124,7 @@ json helpHandler(std::string const &arguments, std::string const &session, void for (auto const &itor : commands) { std::vector<json> commandAnnotations; - commandAnnotations.push_back(std::move(create_annotation(Reply::AnnotationType::italics))); - commandAnnotations.push_back(std::move(create_annotation(Reply::AnnotationType::underline))); + commandAnnotations.push_back(std::move(create_annotation(Reply::AnnotationType::command))); reply_vec.push_back(std::move(create_text("- "))); reply_vec.push_back(std::move(create_text(itor.first, std::move(commandAnnotations)))); |