mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:33:39 +00:00
Handle nullable profile key
This commit is contained in:
parent
eb74f901c1
commit
752c25d627
@ -36,7 +36,7 @@ class MessageRequestResponse(val isApproved: Boolean, var profile: Profile? = nu
|
||||
val profileProto = messageRequestResponseProto.profile
|
||||
val profile = Profile().apply {
|
||||
displayName = profileProto.displayName
|
||||
profileKey = messageRequestResponseProto.profileKey.toByteArray()
|
||||
profileKey = if (messageRequestResponseProto.hasProfileKey()) messageRequestResponseProto.profileKey.toByteArray() else null
|
||||
profilePictureURL = profileProto.profilePicture
|
||||
}
|
||||
return MessageRequestResponse(isApproved, profile)
|
||||
|
Loading…
x
Reference in New Issue
Block a user