diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -956,34 +956,6 @@ return threadIsWithBlockedUserOnly(threadInfo, viewerID, userInfos, true); } -function rawThreadInfoFromThreadInfo(threadInfo: ThreadInfo): RawThreadInfo { - let rawThreadInfo: RawThreadInfo = { - id: threadInfo.id, - type: threadInfo.type, - name: threadInfo.name, - description: threadInfo.description, - color: threadInfo.color, - creationTime: threadInfo.creationTime, - parentThreadID: threadInfo.parentThreadID, - containingThreadID: threadInfo.containingThreadID, - community: threadInfo.community, - members: threadInfo.members.map(relativeMemberInfo => ({ - id: relativeMemberInfo.id, - role: relativeMemberInfo.role, - permissions: relativeMemberInfo.permissions, - isSender: relativeMemberInfo.isSender, - })), - roles: threadInfo.roles, - currentUser: threadInfo.currentUser, - repliesCount: threadInfo.repliesCount, - }; - const { sourceMessageID } = threadInfo; - if (sourceMessageID) { - rawThreadInfo = { ...rawThreadInfo, sourceMessageID }; - } - return rawThreadInfo; -} - const threadTypeDescriptions: { [ThreadType]: string } = { [threadTypes.COMMUNITY_OPEN_SUBTHREAD]: 'Anybody in the parent channel can see an open subchannel.', @@ -1595,7 +1567,6 @@ filterThreadEditDetailedPermissions, threadUIName, threadInfoFromRawThreadInfo, - rawThreadInfoFromThreadInfo, threadTypeDescriptions, usersInThreadInfo, memberIsAdmin,