summaryrefslogtreecommitdiff
path: root/protocols/Discord/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r--protocols/Discord/src/proto.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp
index 2d4befca37..898f30ff8b 100644
--- a/protocols/Discord/src/proto.cpp
+++ b/protocols/Discord/src/proto.cpp
@@ -477,14 +477,13 @@ void __cdecl CDiscordProto::GetAwayMsgThread(void *param)
Thread_SetName("Jabber: GetAwayMsgThread");
auto *pUser = (CDiscordUser *)param;
- if (pUser != nullptr) {
- if (!pUser->wszTopic.IsEmpty()) {
- ProtoBroadcastAck(pUser->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)pUser->wszTopic.c_str());
- return;
- }
- }
+ if (pUser == nullptr)
+ return;
- ProtoBroadcastAck(pUser->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ if (pUser->wszTopic.IsEmpty())
+ ProtoBroadcastAck(pUser->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ else
+ ProtoBroadcastAck(pUser->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)pUser->wszTopic.c_str());
}
HANDLE CDiscordProto::GetAwayMsg(MCONTACT hContact)