Page MenuHomePhabricator

D11970.id40061.diff
No OneTemporary

D11970.id40061.diff

diff --git a/keyserver/src/responders/relationship-responders.js b/keyserver/src/responders/relationship-responders.js
--- a/keyserver/src/responders/relationship-responders.js
+++ b/keyserver/src/responders/relationship-responders.js
@@ -9,7 +9,7 @@
type RelationshipRequest,
farcasterRelationshipRequestValidator,
} from 'lib/types/relationship-types.js';
-import { tShape } from 'lib/utils/validation-utils.js';
+import { tShape, tUserID } from 'lib/utils/validation-utils.js';
import type { Viewer } from '../session/viewer.js';
import { updateRelationships } from '../updaters/relationship-updaters.js';
@@ -20,7 +20,7 @@
traditionalRelationshipActionsList,
'relationship action',
),
- userIDs: t.list(t.String),
+ userIDs: t.list(tUserID),
});
export const updateRelationshipInputValidator: TUnion<RelationshipRequest> =
diff --git a/keyserver/src/responders/thread-responders.js b/keyserver/src/responders/thread-responders.js
--- a/keyserver/src/responders/thread-responders.js
+++ b/keyserver/src/responders/thread-responders.js
@@ -34,6 +34,7 @@
tColor,
tPassword,
tID,
+ tUserID,
} from 'lib/utils/validation-utils.js';
import {
@@ -71,7 +72,7 @@
export const roleChangeRequestInputValidator: TInterface<RoleChangeRequest> =
tShape<RoleChangeRequest>({
threadID: tID,
- memberIDs: t.list(t.String),
+ memberIDs: t.list(tUserID),
role: t.refinement(tID, str => {
if (str.indexOf('|') !== -1) {
str = str.split('|')[1];
@@ -91,7 +92,7 @@
export const removeMembersRequestInputValidator: TInterface<RemoveMembersRequest> =
tShape<RemoveMembersRequest>({
threadID: tID,
- memberIDs: t.list(t.String),
+ memberIDs: t.list(tUserID),
});
async function memberRemovalResponder(
@@ -122,7 +123,7 @@
description: t.maybe(t.String),
color: t.maybe(tColor),
parentThreadID: t.maybe(tID),
- newMemberIDs: t.maybe(t.list(t.String)),
+ newMemberIDs: t.maybe(t.list(tUserID)),
avatar: t.maybe(updateUserAvatarRequestValidator),
}),
accountPassword: t.maybe(tPassword),
@@ -140,7 +141,7 @@
description: t.maybe(t.String),
color: t.maybe(tColor),
parentThreadID: t.maybe(tID),
- initialMemberIDs: t.maybe(t.list(t.String)),
+ initialMemberIDs: t.maybe(t.list(tUserID)),
calendarQuery: t.maybe(entryQueryInputValidator),
};
const newThreadRequestInputValidator: TUnion<ServerNewThreadRequest> = t.union([
diff --git a/keyserver/src/responders/user-responders.js b/keyserver/src/responders/user-responders.js
--- a/keyserver/src/responders/user-responders.js
+++ b/keyserver/src/responders/user-responders.js
@@ -82,6 +82,7 @@
tOldValidUsername,
tRegex,
tID,
+ tUserID,
} from 'lib/utils/validation-utils.js';
import {
@@ -695,7 +696,7 @@
export const keyserverAuthRequestInputValidator: TInterface<KeyserverAuthRequest> =
tShape<KeyserverAuthRequest>({
- userID: t.String,
+ userID: tUserID,
deviceID: t.String,
calendarQuery: entryQueryInputValidator,
deviceTokenUpdateRequest: t.maybe(deviceTokenUpdateRequestInputValidator),

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 27, 4:06 AM (10 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2710381
Default Alt Text
D11970.id40061.diff (3 KB)

Event Timeline