add connection_get_jid()

Use a singleton `Jid` inside the connection instead of always re-creating
a `Jid` from the same string.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2023-11-14 14:53:49 +01:00
parent b18b6cbd29
commit 847a86de50
17 changed files with 88 additions and 101 deletions

View File

@@ -427,7 +427,7 @@ chatwin_outgoing_msg(ProfChatWin* chatwin, const char* const message, char* id,
auto_char char* enc_char = get_enc_char(enc_mode, chatwin->outgoing_char);
auto_jid Jid* myjid = jid_create(connection_get_fulljid());
const Jid* myjid = connection_get_jid();
auto_char char* display_message = plugins_pre_chat_message_display(myjid->barejid, myjid->resourcepart, strdup(message));
if (request_receipt && id) {