Page MenuHomePhabricator

D10195.id34597.diff
No OneTemporary

D10195.id34597.diff

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
@@ -62,7 +62,10 @@
MinimallyEncodedThreadCurrentUserInfo,
MinimallyEncodedThreadInfo,
} from '../types/minimally-encoded-thread-permissions-types.js';
-import { decodeMinimallyEncodedRoleInfo } from '../types/minimally-encoded-thread-permissions-types.js';
+import {
+ decodeMinimallyEncodedRoleInfo,
+ minimallyEncodeThreadInfo,
+} from '../types/minimally-encoded-thread-permissions-types.js';
import { userRelationshipStatus } from '../types/relationship-types.js';
import {
threadPermissionPropagationPrefixes,
@@ -332,7 +335,7 @@
threadColor,
name,
sourceMessageID,
-}: CreatePendingThreadArgs): LegacyThreadInfo {
+}: CreatePendingThreadArgs): MinimallyEncodedThreadInfo {
const now = Date.now();
if (!members.some(member => member.id === viewerID)) {
throw new Error(
@@ -509,7 +512,7 @@
};
function baseCreatePendingSidebar(
input: BaseCreatePendingSidebarInput,
-): LegacyThreadInfo {
+): MinimallyEncodedThreadInfo {
const {
sourceMessageInfo,
parentThreadInfo,
@@ -585,7 +588,7 @@
};
function createUnresolvedPendingSidebar(
input: CreateUnresolvedPendingSidebarInput,
-): LegacyThreadInfo {
+): MinimallyEncodedThreadInfo {
const {
sourceMessageInfo,
parentThreadInfo,
@@ -618,7 +621,7 @@
};
async function createPendingSidebar(
input: CreatePendingSidebarInput,
-): Promise<LegacyThreadInfo> {
+): Promise<MinimallyEncodedThreadInfo> {
const {
sourceMessageInfo,
parentThreadInfo,
@@ -889,7 +892,7 @@
rawThreadInfo: LegacyRawThreadInfo,
viewerID: ?string,
userInfos: UserInfos,
-): LegacyThreadInfo {
+): MinimallyEncodedThreadInfo {
let threadInfo: LegacyThreadInfo = {
id: rawThreadInfo.id,
type: rawThreadInfo.type,
@@ -930,8 +933,7 @@
if (pinnedCount) {
threadInfo = { ...threadInfo, pinnedCount };
}
-
- return threadInfo;
+ return minimallyEncodeThreadInfo(threadInfo);
}
function getCurrentUser(

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 10:40 PM (22 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2433431
Default Alt Text
D10195.id34597.diff (2 KB)

Event Timeline