Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3159243
D10195.id34676.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10195.id34676.diff
View Options
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,
@@ -333,7 +336,7 @@
threadColor,
name,
sourceMessageID,
-}: CreatePendingThreadArgs): LegacyThreadInfo {
+}: CreatePendingThreadArgs): MinimallyEncodedThreadInfo {
const now = Date.now();
if (!members.some(member => member.id === viewerID)) {
throw new Error(
@@ -510,7 +513,7 @@
};
function baseCreatePendingSidebar(
input: BaseCreatePendingSidebarInput,
-): LegacyThreadInfo {
+): MinimallyEncodedThreadInfo {
const {
sourceMessageInfo,
parentThreadInfo,
@@ -586,7 +589,7 @@
};
function createUnresolvedPendingSidebar(
input: CreateUnresolvedPendingSidebarInput,
-): LegacyThreadInfo {
+): MinimallyEncodedThreadInfo {
const {
sourceMessageInfo,
parentThreadInfo,
@@ -619,7 +622,7 @@
};
async function createPendingSidebar(
input: CreatePendingSidebarInput,
-): Promise<LegacyThreadInfo> {
+): Promise<MinimallyEncodedThreadInfo> {
const {
sourceMessageInfo,
parentThreadInfo,
@@ -890,7 +893,7 @@
rawThreadInfo: LegacyRawThreadInfo,
viewerID: ?string,
userInfos: UserInfos,
-): LegacyThreadInfo {
+): MinimallyEncodedThreadInfo {
let threadInfo: LegacyThreadInfo = {
id: rawThreadInfo.id,
type: rawThreadInfo.type,
@@ -931,8 +934,7 @@
if (pinnedCount) {
threadInfo = { ...threadInfo, pinnedCount };
}
-
- return threadInfo;
+ return minimallyEncodeThreadInfo(threadInfo);
}
function getCurrentUser(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 10:26 PM (21 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2432058
Default Alt Text
D10195.id34676.diff (2 KB)
Attached To
Mode
D10195: [lib] Update `threadInfoFromRawThreadInfo` to return `MinimallyEncodedThreadInfo`
Attached
Detach File
Event Timeline
Log In to Comment