Skip to content

Commit c69ec65

Browse files
committed
fix(chat): have imageData be nullable
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 692a761 commit c69ec65

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • api/src/main/java/com/getcode/model/chat

api/src/main/java/com/getcode/model/chat/Chat.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ data class Chat(
3333
val cursor: Cursor,
3434
val messages: List<ChatMessage>
3535
) {
36-
val imageData: Any
36+
val imageData: Any?
3737
get() {
3838
return when (type) {
3939
ChatType.Unknown -> id
4040
ChatType.Notification -> id
4141
ChatType.TwoWay -> {
4242
members
4343
.filterNot { it.isSelf }
44-
.firstNotNullOf {
44+
.firstNotNullOfOrNull {
4545
if (it.identity != null) {
4646
it.identity.imageUrl.orEmpty()
4747
} else {

0 commit comments

Comments
 (0)