diff --git a/lib/shared/messages/create-thread-message-spec.js b/lib/shared/messages/create-thread-message-spec.js --- a/lib/shared/messages/create-thread-message-spec.js +++ b/lib/shared/messages/create-thread-message-spec.js @@ -9,6 +9,7 @@ type RobotextParams, } from './message-spec.js'; import { assertSingleMessageInfo } from './utils.js'; +import genesis from '../../facts/genesis.js'; import { messageTypes } from '../../types/message-types-enum.js'; import type { ClientDBMessageInfo, @@ -56,13 +57,21 @@ }, rawMessageInfoFromServerDBRow(row: Object): RawCreateThreadMessageInfo { + const threadID = row.threadID.toString(); + let initialThreadState = JSON.parse(row.content); + if (threadID === genesis().id) { + initialThreadState = { + ...initialThreadState, + memberIDs: [], + }; + } return { type: messageTypes.CREATE_THREAD, id: row.id.toString(), - threadID: row.threadID.toString(), + threadID, time: row.time, creatorID: row.creatorID.toString(), - initialThreadState: JSON.parse(row.content), + initialThreadState, }; },