From f572ddd280710dcaf149a2926d89f3f6c54fa85a Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Tue, 20 Jul 2021 21:30:37 +0200 Subject: [PATCH] IRCClient: Use target nick than the sender for received private chats Sending a private message from other device by using a bouncer caused the message to appear in the wrong channel, as if you had sent it to yourself. --- Userland/Applications/IRCClient/IRCClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Applications/IRCClient/IRCClient.cpp b/Userland/Applications/IRCClient/IRCClient.cpp index 1413fb071b..0b66e7f358 100644 --- a/Userland/Applications/IRCClient/IRCClient.cpp +++ b/Userland/Applications/IRCClient/IRCClient.cpp @@ -516,9 +516,9 @@ void IRCClient::handle_privmsg_or_notice(const Message& msg, PrivmsgOrNotice typ // Otherwise, put them in the server window. This seems to match other clients. IRCQuery* query = nullptr; if (is_ctcp || type == PrivmsgOrNotice::Notice) { - query = query_with_name(sender_nick); + query = query_with_name(target); } else { - query = &ensure_query(sender_nick); + query = &ensure_query(target); } if (query) { if (insert_as_raw_message)