Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3365847
D12969.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
D12969.diff
View Options
diff --git a/lib/shared/dm-ops/join-thread-spec.js b/lib/shared/dm-ops/join-thread-spec.js
--- a/lib/shared/dm-ops/join-thread-spec.js
+++ b/lib/shared/dm-ops/join-thread-spec.js
@@ -32,7 +32,7 @@
viewerID: string,
utilities: ProcessDMOperationUtilities,
) => {
- const { editorID, time, messageID, existingThreadDetails } = dmOperation;
+ const { joinerID, time, messageID, existingThreadDetails } = dmOperation;
const currentThreadInfo =
utilities.threadInfos[existingThreadDetails.threadID];
@@ -41,11 +41,11 @@
type: messageTypes.JOIN_THREAD,
id: messageID,
threadID: existingThreadDetails.threadID,
- creatorID: editorID,
+ creatorID: joinerID,
time,
};
- if (userIsMember(currentThreadInfo, editorID)) {
+ if (userIsMember(currentThreadInfo, joinerID)) {
return {
rawMessageInfos: [joinThreadMessage],
updateInfos: [
@@ -62,11 +62,11 @@
const updateInfos: Array<ClientUpdateInfo> = [];
const rawMessageInfos: Array<RawMessageInfo> = [];
- if (viewerID === editorID) {
+ if (viewerID === joinerID) {
const newThreadInfo = createThickRawThreadInfo(
{
...existingThreadDetails,
- allMemberIDs: [...existingThreadDetails.allMemberIDs, editorID],
+ allMemberIDs: [...existingThreadDetails.allMemberIDs, joinerID],
},
viewerID,
);
@@ -109,10 +109,10 @@
);
const member = minimallyEncodeMemberInfo<ThickMemberInfo>({
- id: editorID,
+ id: joinerID,
role: defaultRoleID,
permissions: membershipPermissions,
- isSender: editorID === viewerID,
+ isSender: joinerID === viewerID,
subscription: joinThreadSubscription,
});
const updatedThreadInfo = {
diff --git a/lib/types/dm-ops.js b/lib/types/dm-ops.js
--- a/lib/types/dm-ops.js
+++ b/lib/types/dm-ops.js
@@ -193,7 +193,7 @@
export type DMJoinThreadOperation = {
+type: 'join_thread',
- +editorID: string,
+ +joinerID: string,
+time: number,
+messageID: string,
+existingThreadDetails: CreateThickRawThreadInfoInput,
@@ -201,7 +201,7 @@
export const dmJoinThreadOperationValidator: TInterface<DMJoinThreadOperation> =
tShape<DMJoinThreadOperation>({
type: tString(dmOperationTypes.JOIN_THREAD),
- editorID: tUserID,
+ joinerID: tUserID,
time: t.Number,
messageID: t.String,
existingThreadDetails: createThickRawThreadInfoInputValidator,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 8:04 AM (21 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2583960
Default Alt Text
D12969.diff (2 KB)
Attached To
Mode
D12969: [lib] Rename editor to joiner in join thread operation
Attached
Detach File
Event Timeline
Log In to Comment