Page MenuHomePhabricator

D10117.diff
No OneTemporary

D10117.diff

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

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)

Event Timeline