From fd3a9770095dbc139570cc412697c1cc07c08554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Fri, 23 Aug 2024 02:07:25 +0200 Subject: [PATCH] Creating contract on profile update. --- Wino.Core/Services/AccountService.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Wino.Core/Services/AccountService.cs b/Wino.Core/Services/AccountService.cs index 14a10023..f7a6842d 100644 --- a/Wino.Core/Services/AccountService.cs +++ b/Wino.Core/Services/AccountService.cs @@ -332,6 +332,17 @@ namespace Wino.Core.Services account.SenderName = profileInformation.SenderName; account.Base64ProfilePictureData = profileInformation.Base64ProfilePictureData; + // Forcefully add or update a contact data with the provided information. + + var accountContact = new AccountContact() + { + Address = account.Address, + Name = account.SenderName, + Base64ContactPicture = account.Base64ProfilePictureData + }; + + await Connection.InsertOrReplaceAsync(accountContact).ConfigureAwait(false); + await UpdateAccountAsync(account).ConfigureAwait(false); } }