messenger-gtk

Gtk+3 graphical user interfaces for GNUnet Messenger
Log | Files | Refs | Submodules | README | LICENSE

commit 0bd5ee192263caa91b13122a23e35f0f8a27d38e
parent 446862e5869e8888f829d9b6f4893663b7470274
Author: TheJackiMonster <thejackimonster@gmail.com>
Date:   Thu, 16 Dec 2021 00:59:26 +0100

Filtered contacts to not invite themselves

Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>

Diffstat:
Msrc/ui/chat.c | 5++++-
Msrc/ui/contacts.c | 3++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/ui/chat.c b/src/ui/chat.c @@ -24,6 +24,8 @@ #include "chat.h" +#include <gdk/gdkkeysyms.h> + #include "messenger.h" #include "picker.h" #include "profile_entry.h" @@ -61,7 +63,8 @@ handle_chat_contacts_listbox_row_activated(UNUSED GtkListBox* listbox, g_hash_table_lookup(app->ui.bindings, row) ); - if ((!contact) || (!GNUNET_CHAT_contact_get_key(contact))) + if ((!contact) || (!GNUNET_CHAT_contact_get_key(contact)) || + (GNUNET_YES == GNUNET_CHAT_contact_is_owned(contact))) return; struct GNUNET_CHAT_Context *context = GNUNET_CHAT_contact_get_context( diff --git a/src/ui/contacts.c b/src/ui/contacts.c @@ -64,7 +64,8 @@ handle_contacts_listbox_row_activated(UNUSED GtkListBox* listbox, g_hash_table_lookup(app->ui.bindings, row) ); - if ((!contact) || (!GNUNET_CHAT_contact_get_key(contact))) + if ((!contact) || (!GNUNET_CHAT_contact_get_key(contact)) || + (GNUNET_YES == GNUNET_CHAT_contact_is_owned(contact))) goto close_dialog; struct GNUNET_CHAT_Context *context = GNUNET_CHAT_contact_get_context(