We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 692a761 + c69ec65 commit e391340Copy full SHA for e391340
1 file changed
api/src/main/java/com/getcode/model/chat/Chat.kt
@@ -33,15 +33,15 @@ data class Chat(
33
val cursor: Cursor,
34
val messages: List<ChatMessage>
35
) {
36
- val imageData: Any
+ val imageData: Any?
37
get() {
38
return when (type) {
39
ChatType.Unknown -> id
40
ChatType.Notification -> id
41
ChatType.TwoWay -> {
42
members
43
.filterNot { it.isSelf }
44
- .firstNotNullOf {
+ .firstNotNullOfOrNull {
45
if (it.identity != null) {
46
it.identity.imageUrl.orEmpty()
47
} else {
0 commit comments