diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2021-12-16 00:59:26 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2021-12-16 00:59:26 +0100 |
commit | 0bd5ee192263caa91b13122a23e35f0f8a27d38e (patch) | |
tree | 3a313eb5e21b158cfb62836ac0027d155026dd3f | |
parent | 446862e5869e8888f829d9b6f4893663b7470274 (diff) | |
download | messenger-gtk-0bd5ee192263caa91b13122a23e35f0f8a27d38e.tar.gz messenger-gtk-0bd5ee192263caa91b13122a23e35f0f8a27d38e.zip |
Filtered contacts to not invite themselves
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-rw-r--r-- | src/ui/chat.c | 5 | ||||
-rw-r--r-- | src/ui/contacts.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/chat.c b/src/ui/chat.c index 92dbdec..f19ee1e 100644 --- a/src/ui/chat.c +++ b/src/ui/chat.c | |||
@@ -24,6 +24,8 @@ | |||
24 | 24 | ||
25 | #include "chat.h" | 25 | #include "chat.h" |
26 | 26 | ||
27 | #include <gdk/gdkkeysyms.h> | ||
28 | |||
27 | #include "messenger.h" | 29 | #include "messenger.h" |
28 | #include "picker.h" | 30 | #include "picker.h" |
29 | #include "profile_entry.h" | 31 | #include "profile_entry.h" |
@@ -61,7 +63,8 @@ handle_chat_contacts_listbox_row_activated(UNUSED GtkListBox* listbox, | |||
61 | g_hash_table_lookup(app->ui.bindings, row) | 63 | g_hash_table_lookup(app->ui.bindings, row) |
62 | ); | 64 | ); |
63 | 65 | ||
64 | if ((!contact) || (!GNUNET_CHAT_contact_get_key(contact))) | 66 | if ((!contact) || (!GNUNET_CHAT_contact_get_key(contact)) || |
67 | (GNUNET_YES == GNUNET_CHAT_contact_is_owned(contact))) | ||
65 | return; | 68 | return; |
66 | 69 | ||
67 | struct GNUNET_CHAT_Context *context = GNUNET_CHAT_contact_get_context( | 70 | struct GNUNET_CHAT_Context *context = GNUNET_CHAT_contact_get_context( |
diff --git a/src/ui/contacts.c b/src/ui/contacts.c index 8fd38e0..2e445ba 100644 --- a/src/ui/contacts.c +++ b/src/ui/contacts.c | |||
@@ -64,7 +64,8 @@ handle_contacts_listbox_row_activated(UNUSED GtkListBox* listbox, | |||
64 | g_hash_table_lookup(app->ui.bindings, row) | 64 | g_hash_table_lookup(app->ui.bindings, row) |
65 | ); | 65 | ); |
66 | 66 | ||
67 | if ((!contact) || (!GNUNET_CHAT_contact_get_key(contact))) | 67 | if ((!contact) || (!GNUNET_CHAT_contact_get_key(contact)) || |
68 | (GNUNET_YES == GNUNET_CHAT_contact_is_owned(contact))) | ||
68 | goto close_dialog; | 69 | goto close_dialog; |
69 | 70 | ||
70 | struct GNUNET_CHAT_Context *context = GNUNET_CHAT_contact_get_context( | 71 | struct GNUNET_CHAT_Context *context = GNUNET_CHAT_contact_get_context( |