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

@@ -630,8 +630,7 @@ sv_ev_incoming_message(ProfMessage* message)
char* looking_for_jid = message->from_jid->barejid;
if (message->is_mam) {
auto_char char* mybarejid = connection_get_barejid();
if (g_strcmp0(mybarejid, message->from_jid->barejid) == 0) {
if (g_strcmp0(connection_get_barejid(), message->from_jid->barejid) == 0) {
if (message->to_jid) {
looking_for_jid = message->to_jid->barejid;
}