messenger-gtk

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

commit 0b146f0b3edbee3724b9f3630c611c0717db6f23
parent 1388979c7583529615418392a553854bb7129557
Author: Jacki <jacki@thejackimonster.de>
Date:   Wed,  8 May 2024 16:55:06 +0200

Use defined attribute name from libgnunetchat for avatars

Signed-off-by: Jacki <jacki@thejackimonster.de>

Diffstat:
Msrc/account.c | 2+-
Msrc/contact.c | 2+-
Msrc/contact.h | 2--
Msrc/ui/contact_info.c | 2+-
Msrc/ui/new_account.c | 2+-
5 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/account.c b/src/account.c @@ -250,7 +250,7 @@ _account_iterate_attribute(void *cls, if (!info) return GNUNET_NO; - if ((0 != strcmp(name, ATTRIBUTE_PROFILE_PICTURE)) || (!value)) + if ((0 != strcmp(name, GNUNET_CHAT_ATTRIBUTE_AVATAR)) || (!value)) return GNUNET_YES; struct GNUNET_CHAT_Uri *uri = GNUNET_CHAT_uri_parse(value, NULL); diff --git a/src/contact.c b/src/contact.c @@ -304,7 +304,7 @@ _info_iterate_attribute(MESSENGER_ContactInfo* info, { g_assert((info) && (handle) && (contact) && (name)); - if ((0 != strcmp(name, ATTRIBUTE_PROFILE_PICTURE)) || (!value)) + if ((0 != strcmp(name, GNUNET_CHAT_ATTRIBUTE_AVATAR)) || (!value)) return GNUNET_YES; struct GNUNET_CHAT_Uri *uri = GNUNET_CHAT_uri_parse(value, NULL); diff --git a/src/contact.h b/src/contact.h @@ -27,8 +27,6 @@ #include "application.h" -#define ATTRIBUTE_PROFILE_PICTURE "profile" - typedef struct MESSENGER_ContactInfo { void *last_message; diff --git a/src/ui/contact_info.c b/src/ui/contact_info.c @@ -163,7 +163,7 @@ _cb_file_upload(void *cls, { GNUNET_CHAT_set_attribute( app->chat.messenger.handle, - ATTRIBUTE_PROFILE_PICTURE, + GNUNET_CHAT_ATTRIBUTE_AVATAR, uri_string, GNUNET_TIME_relative_get_forever_() ); diff --git a/src/ui/new_account.c b/src/ui/new_account.c @@ -276,7 +276,7 @@ _cb_file_upload(void *cls, { GNUNET_CHAT_set_attribute( app->chat.messenger.handle, - ATTRIBUTE_PROFILE_PICTURE, + GNUNET_CHAT_ATTRIBUTE_AVATAR, uri_string, GNUNET_TIME_relative_get_forever_() );