diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp --- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp +++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp @@ -637,6 +637,12 @@ int repliesCount = std::lround(threadObj.getProperty(rt, "repliesCount").asNumber()); + + jsi::Value maybeAvatar = threadObj.getProperty(rt, "avatar"); + std::unique_ptr avatar = maybeAvatar.isString() + ? std::make_unique(maybeAvatar.asString(rt).utf8(rt)) + : nullptr; + Thread thread{ threadID, type, @@ -651,7 +657,8 @@ roles, currentUser, std::move(sourceMessageID), - repliesCount}; + repliesCount, + std::move(avatar)}; threadStoreOps.push_back( std::make_unique(std::move(thread)));