Page MenuHomePhabricator

D13816.diff
No OneTemporary

D13816.diff

diff --git a/keyserver/src/creators/thread-creator.js b/keyserver/src/creators/thread-creator.js
--- a/keyserver/src/creators/thread-creator.js
+++ b/keyserver/src/creators/thread-creator.js
@@ -62,6 +62,7 @@
+forceAddMembers: boolean,
+updatesForCurrentSession: UpdatesForCurrentSession,
+silentlyFailMembers: boolean,
+ +dontAddViewerAsMember: boolean,
}>;
// If forceAddMembers is set, we will allow the viewer to add random users who
@@ -358,17 +359,24 @@
: Promise.resolve(undefined);
const [
- creatorChangeset,
initialMembersChangeset,
ghostMembersChangeset,
recalculatePermissionsChangeset,
] = await Promise.all([
- changeRole(id, [viewer.userID], newRoles.creator.id),
initialMemberPromise,
ghostMemberPromise,
recalculateThreadPermissions(id),
]);
+ let creatorChangeset: MembershipChangeset = {
+ membershipRows: [],
+ relationshipChangeset: new RelationshipChangeset(),
+ };
+
+ creatorChangeset = options?.dontAddViewerAsMember
+ ? creatorChangeset
+ : await changeRole(id, [viewer.userID], newRoles.creator.id);
+
const {
membershipRows: creatorMembershipRows,
relationshipChangeset: creatorRelationshipChangeset,

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 8:37 PM (15 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2572365
Default Alt Text
D13816.diff (1 KB)

Event Timeline