Skip to content

Commit 636f218

Browse files
committed
Support for setting empty profile name
1 parent c3400b9 commit 636f218

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

libsignal-service-dotnet/SignalServiceAccountManager.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,8 @@ public TurnServerInfo GetTurnServerInfo()
343343
/// <param name="name"></param>
344344
public void SetProfileName(byte[] key, string name)
345345
{
346-
String ciphertextName = null;
347-
if (name != null)
348-
{
349-
ciphertextName = Base64.encodeBytesWithoutPadding(new ProfileCipher(key).EncryptName(Encoding.Unicode.GetBytes(name), ProfileCipher.NAME_PADDED_LENGTH));
350-
}
346+
if (name == null) name = "";
347+
string ciphertextName = Base64.encodeBytesWithoutPadding(new ProfileCipher(key).EncryptName(Encoding.Unicode.GetBytes(name), ProfileCipher.NAME_PADDED_LENGTH));
351348
PushServiceSocket.SetProfileName(ciphertextName);
352349
}
353350

0 commit comments

Comments
 (0)