From 358f68d2679640d502d0a13b1d09ee2b3490b4e1 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 15 Mar 2023 20:19:54 -0400 Subject: cleanup and escape notification bodies --- src/misc/chatutil.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/misc/chatutil.hpp (limited to 'src/misc/chatutil.hpp') diff --git a/src/misc/chatutil.hpp b/src/misc/chatutil.hpp new file mode 100644 index 0000000..f0520fe --- /dev/null +++ b/src/misc/chatutil.hpp @@ -0,0 +1,19 @@ +#pragma once +#include +#include +#include "discord/snowflake.hpp" + +namespace Gtk { +class TextBuffer; +class TextView; +} // namespace Gtk + +namespace ChatUtil { +Glib::ustring GetText(const Glib::RefPtr &buf); +void HandleRoleMentions(const Glib::RefPtr &buf); +void HandleUserMentions(const Glib::RefPtr &buf, Snowflake channel_id, bool plain); +void HandleStockEmojis(Gtk::TextView &tv); +void HandleCustomEmojis(Gtk::TextView &tv); +void HandleEmojis(Gtk::TextView &tv); +void CleanupEmojis(const Glib::RefPtr &buf); +} // namespace ChatUtil -- cgit v1.2.3