From 016e6d80ff4b673bec15547a92eefcd05ef91fef Mon Sep 17 00:00:00 2001
From: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
Date: Mon, 29 Oct 2018 11:31:57 -0400
Subject: [PATCH] newaccountmodel: registered name for SIP account

After updating SIP account profile, account URI disappears from
select account widget because registered name is the same as a
display name.
This patch set registered name empty when update account from
configuration properties because SIP account does not have
registered name.

Change-Id: I8ce9a98e390328e2a9a9404bf8c079547adc9ca3
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
---
 src/newaccountmodel.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/newaccountmodel.cpp b/src/newaccountmodel.cpp
index 5c2d3432..ff20a588 100644
--- a/src/newaccountmodel.cpp
+++ b/src/newaccountmodel.cpp
@@ -605,7 +605,7 @@ account::Info::fromDetails(const MapStringString& details)
     // General
     if (details[ConfProperties::TYPE] != "")
         profileInfo.type                                = details[ConfProperties::TYPE] == QString(ProtocolNames::RING) ? profile::Type::RING : profile::Type::SIP;
-    registeredName                                      = profileInfo.type == profile::Type::RING ? volatileDetails[VolatileProperties::REGISTERED_NAME].toStdString() : profileInfo.alias;
+    registeredName                                      = profileInfo.type == profile::Type::RING ? volatileDetails[VolatileProperties::REGISTERED_NAME].toStdString() : "";
     profileInfo.alias                                   = toStdString(details[ConfProperties::ALIAS]);
     enabled                                             = toBool(details[ConfProperties::ENABLED]);
     confProperties.mailbox                              = toStdString(details[ConfProperties::MAILBOX]);
-- 
GitLab