messenger-cli

Command-line user interface for GNUnet Messenger
Log | Files | Refs | README | LICENSE

commit 14988419ae094810e47864afe9392b26355840db
parent 496a2b7fd5e365c7a4e06f48d99ccb2a4136a430
Author: Jacki <jacki@thejackimonster.de>
Date:   Fri, 13 Jun 2025 22:44:58 +0200

List own contact for notes feed and add proper names to public chat groups

Diffstat:
Msrc/ui/chat_open_dialog.c | 14+++++++++++++-
Msrc/ui/chats.c | 8--------
2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/ui/chat_open_dialog.c b/src/ui/chat_open_dialog.c @@ -43,12 +43,24 @@ chat_open_dialog_event(UI_CHAT_OPEN_DIALOG_Handle *open_dialog, break; case '\n': case KEY_ENTER: + { if (open_dialog->topic_len > 0) - GNUNET_CHAT_group_create(app->chat.handle, open_dialog->topic); + { + struct GNUNET_CHAT_Group *group; + char *group_name = malloc(open_dialog->topic_len + 2); + + group = GNUNET_CHAT_group_create(app->chat.handle, open_dialog->topic); + group_name[0] = '#'; + memcpy(group_name + 1, open_dialog->topic, open_dialog->topic_len + 1); + + GNUNET_CHAT_group_set_name(group, group_name); + free(group_name); + } open_dialog->topic_len = 0; open_dialog->window = NULL; break; + } default: break; } diff --git a/src/ui/chats.c b/src/ui/chats.c @@ -46,10 +46,6 @@ _chats_iterate_contact(void *cls, struct GNUNET_CHAT_Contact *contact) { UI_CHATS_Handle *chats = cls; - - if (GNUNET_YES == GNUNET_CHAT_contact_is_owned(contact)) - return GNUNET_YES; - list_input_select(chats, 1, GNUNET_CHAT_contact_get_context(contact)); return GNUNET_YES; } @@ -187,10 +183,6 @@ _chats_iterate_print_contact(void *cls, struct GNUNET_CHAT_Contact *contact) { UI_CHATS_Handle *chats = cls; - - if (GNUNET_YES == GNUNET_CHAT_contact_is_owned(contact)) - return GNUNET_YES; - const char *name = GNUNET_CHAT_contact_get_name(contact); return _chats_print_entry(chats, 'x', 'C', name); }