From 6093689cc42b404e990c1cf4562edb761a56eff2 Mon Sep 17 00:00:00 2001
From: Leopold <lchappuis@lchappuis-pc.mtl.sfl>
Date: Fri, 6 Dec 2024 11:02:56 -0500
Subject: [PATCH] update-profile: fix dbus build issue

The dbus build was failing due to updateProfile having an incorrect number of arguments.

Change-Id: I0045554e2fc62851fc2cffdac27c8ab1cb905547
---
 src/libclient/accountmodel.cpp                      | 2 ++
 src/libclient/qtwrapper/configurationmanager_wrap.h | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/libclient/accountmodel.cpp b/src/libclient/accountmodel.cpp
index 3483f67f2..a1244eb45 100644
--- a/src/libclient/accountmodel.cpp
+++ b/src/libclient/accountmodel.cpp
@@ -287,6 +287,7 @@ AccountModel::setAlias(const QString& accountId, const QString& alias, bool save
         ConfigurationManager::instance().updateProfile(accountId,
                                                        alias,
                                                        "",
+                                                       "",
                                                        5);// flag out of range to avoid updating avatar
     Q_EMIT profileUpdated(accountId);
 }
@@ -302,6 +303,7 @@ AccountModel::setAvatar(const QString& accountId, const QString& avatar, bool sa
         ConfigurationManager::instance().updateProfile(accountId,
                                                        accountInfo.profileInfo.alias,
                                                        avatar,
+                                                       "PNG",
                                                        flag);
     Q_EMIT profileUpdated(accountId);
 }
diff --git a/src/libclient/qtwrapper/configurationmanager_wrap.h b/src/libclient/qtwrapper/configurationmanager_wrap.h
index 157e05af6..7b89048fa 100644
--- a/src/libclient/qtwrapper/configurationmanager_wrap.h
+++ b/src/libclient/qtwrapper/configurationmanager_wrap.h
@@ -489,6 +489,7 @@ public Q_SLOTS: // METHODS
     void updateProfile(const QString& accountId,
                        const QString& displayName,
                        const QString& avatarPath,
+                       const QString& fileType,
                        int flag)
     {
         // file type is set to PNG by default
@@ -496,7 +497,7 @@ public Q_SLOTS: // METHODS
         libjami::updateProfile(accountId.toStdString(),
                                displayName.toStdString(),
                                avatarPath.toStdString(),
-                               "PNG",
+                               fileType.toStdString(),
                                flag
                                );
     }
-- 
GitLab