From 45b8bdc04d43707a317521d0869054b8f4d84c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Pettersson?= Date: Thu, 4 Sep 2014 00:34:10 +0200 Subject: [PATCH] Fixed bug where the wrong address would be echoed after accepting a friend request. --- src/tox-weechat-commands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tox-weechat-commands.c b/src/tox-weechat-commands.c index f359d7d..0b6f040 100644 --- a/src/tox-weechat-commands.c +++ b/src/tox-weechat-commands.c @@ -205,12 +205,13 @@ tox_weechat_cmd_friend(void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_OK; } + char *hex_id = tox_weechat_bin2hex(request->address, TOX_CLIENT_ID_SIZE); + if (accept) tox_weechat_accept_friend_request(request); else tox_weechat_decline_friend_request(request); - char *hex_id = tox_weechat_bin2hex(request->address, TOX_CLIENT_ID_SIZE); weechat_printf(tox_main_buffer, "%s%s friend request from %s.", weechat_prefix("network"),