Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3522397
D10117.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
804 B
Referenced Files
None
Subscribers
None
D10117.diff
View Options
diff --git a/keyserver/src/creators/invite-link-creator.js b/keyserver/src/creators/invite-link-creator.js
--- a/keyserver/src/creators/invite-link-creator.js
+++ b/keyserver/src/creators/invite-link-creator.js
@@ -2,6 +2,7 @@
import Filter from 'bad-words';
+import { roleIsDefaultRole } from 'lib/shared/thread-utils.js';
import type {
CreateOrUpdatePublicLinkRequest,
InviteLink,
@@ -60,8 +61,8 @@
if (!threadInfo) {
throw new ServerError('invalid_parameters');
}
- const defaultRoleID = Object.keys(threadInfo.roles).find(
- roleID => threadInfo.roles[roleID].isDefault,
+ const defaultRoleID = Object.keys(threadInfo.roles).find(roleID =>
+ roleIsDefaultRole(threadInfo.roles[roleID]),
);
if (!defaultRoleID) {
throw new ServerError('invalid_parameters');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 6:35 AM (20 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2698757
Default Alt Text
D10117.diff (804 B)
Attached To
Mode
D10117: [keyserver] Update existing checks on isDefault in invite-link-creator.js
Attached
Detach File
Event Timeline
Log In to Comment