From 3deb2b10020529ac36cf7ab298e0be425887c88f Mon Sep 17 00:00:00 2001
From: ouwou <26526779+ouwou@users.noreply.github.com>
Date: Sat, 24 Apr 2021 04:23:28 -0400
Subject: basic handling of CALL messages
---
components/chatmessage.cpp | 3 +++
discord/message.hpp | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/components/chatmessage.cpp b/components/chatmessage.cpp
index 4d38806..03398dd 100644
--- a/components/chatmessage.cpp
+++ b/components/chatmessage.cpp
@@ -274,6 +274,9 @@ void ChatMessageItemContainer::UpdateTextComponent(Gtk::TextView *tv) {
const auto author = Abaddon::Get().GetDiscordClient().GetUser(data->Author.ID);
b->insert_markup(s, "" + author->GetEscapedBoldName() + " has added " + Glib::Markup::escape_text(data->Content) + " to this channel. Its most important updates will show up here.");
} break;
+ case MessageType::CALL: {
+ b->insert_markup(s, "[started a call]");
+ } break;
default: break;
}
}
diff --git a/discord/message.hpp b/discord/message.hpp
index 66d0afd..baf147e 100644
--- a/discord/message.hpp
+++ b/discord/message.hpp
@@ -13,7 +13,7 @@ enum class MessageType {
DEFAULT = 0, // yep
RECIPIENT_ADD = 1, // yep
RECIPIENT_REMOVE = 2, // yep
- CALL = 3, // nope
+ CALL = 3, // yep (sorta)
CHANNEL_NAME_CHANGE = 4, // yep
CHANNEL_ICON_CHANGE = 5, // yep
CHANNEL_PINNED_MESSAGE = 6, // yep
--
cgit v1.2.3