summaryrefslogtreecommitdiff
path: root/discord/discord.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-05-08 23:37:52 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2021-05-08 23:37:52 -0400
commitabd2b9c71e98f3d9feab8d5b4d288b246015ee0d (patch)
treeaecc28fd04f15fd44cf88326739f140fb5421e48 /discord/discord.cpp
parent78d3c5b679597dfa82910a6ea1e266349fa23a39 (diff)
parent469053a14468f08dc694a1ef8d98f0265a72dd07 (diff)
downloadabaddon-portaudio-abd2b9c71e98f3d9feab8d5b4d288b246015ee0d.tar.gz
abaddon-portaudio-abd2b9c71e98f3d9feab8d5b4d288b246015ee0d.zip
Merge branch 'master' into friends
Diffstat (limited to 'discord/discord.cpp')
-rw-r--r--discord/discord.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/discord/discord.cpp b/discord/discord.cpp
index 4596204..1869a59 100644
--- a/discord/discord.cpp
+++ b/discord/discord.cpp
@@ -1039,6 +1039,9 @@ void DiscordClient::HandleGatewayMessage(std::string str) {
case GatewayEvent::GUILD_JOIN_REQUEST_DELETE: {
HandleGatewayGuildJoinRequestDelete(m);
} break;
+ case GatewayEvent::RELATIONSHIP_REMOVE: {
+ HandleGatewayRelationshipRemove(m);
+ } break;
}
} break;
default:
@@ -1480,6 +1483,12 @@ void DiscordClient::HandleGatewayGuildJoinRequestDelete(const GatewayMessage &ms
m_signal_guild_join_request_delete.emit(data);
}
+void DiscordClient::HandleGatewayRelationshipRemove(const GatewayMessage &msg) {
+ RelationshipRemoveData data = msg.Data;
+ m_user_relationships.erase(data.ID);
+ m_signal_relationship_remove.emit(data.ID, data.Type);
+}
+
void DiscordClient::HandleGatewayReadySupplemental(const GatewayMessage &msg) {
ReadySupplementalData data = msg.Data;
for (const auto &p : data.MergedPresences.Friends) {
@@ -1815,6 +1824,7 @@ void DiscordClient::LoadEventMap() {
m_event_map["GUILD_JOIN_REQUEST_CREATE"] = GatewayEvent::GUILD_JOIN_REQUEST_CREATE;
m_event_map["GUILD_JOIN_REQUEST_UPDATE"] = GatewayEvent::GUILD_JOIN_REQUEST_UPDATE;
m_event_map["GUILD_JOIN_REQUEST_DELETE"] = GatewayEvent::GUILD_JOIN_REQUEST_DELETE;
+ m_event_map["RELATIONSHIP_REMOVE"] = GatewayEvent::RELATIONSHIP_REMOVE;
}
DiscordClient::type_signal_gateway_ready DiscordClient::signal_gateway_ready() {
@@ -1937,6 +1947,10 @@ DiscordClient::type_signal_guild_join_request_delete DiscordClient::signal_guild
return m_signal_guild_join_request_delete;
}
+DiscordClient::type_signal_relationship_remove DiscordClient::signal_relationship_remove() {
+ return m_signal_relationship_remove;
+}
+
DiscordClient::type_signal_message_sent DiscordClient::signal_message_sent() {
return m_signal_message_sent;
}