Page MenuHomePhabricator

D11962.diff
No OneTemporary

D11962.diff

diff --git a/lib/types/message-types.js b/lib/types/message-types.js
--- a/lib/types/message-types.js
+++ b/lib/types/message-types.js
@@ -145,7 +145,7 @@
import { type RelativeUserInfo, type UserInfos } from './user-types.js';
import type { CallSingleKeyserverEndpointResultInfoInterface } from '../keyserver-conn/call-single-keyserver-endpoint.js';
import { values } from '../utils/objects.js';
-import { tID, tNumber, tShape } from '../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../utils/validation-utils.js';
const composableMessageTypes = new Set([
messageTypes.TEXT,
@@ -320,7 +320,7 @@
tShape<RawSidebarSourceMessageInfo>({
type: tNumber(messageTypes.SIDEBAR_SOURCE),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
sourceMessage: t.maybe(
t.union([
diff --git a/lib/types/messages/add-members.js b/lib/types/messages/add-members.js
--- a/lib/types/messages/add-members.js
+++ b/lib/types/messages/add-members.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tShape, tID, tNumber } from '../../utils/validation-utils.js';
+import { tShape, tID, tNumber, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -23,9 +23,9 @@
tShape<RawAddMembersMessageInfo>({
type: tNumber(messageTypes.ADD_MEMBERS),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
- addedUserIDs: t.list(t.String),
+ addedUserIDs: t.list(tUserID),
id: tID,
});
diff --git a/lib/types/messages/change-role.js b/lib/types/messages/change-role.js
--- a/lib/types/messages/change-role.js
+++ b/lib/types/messages/change-role.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -25,9 +25,9 @@
tShape<RawChangeRoleMessageInfo>({
type: tNumber(messageTypes.CHANGE_ROLE),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
- userIDs: t.list(t.String),
+ userIDs: t.list(tUserID),
newRole: tID,
id: tID,
roleName: t.maybe(t.String),
diff --git a/lib/types/messages/change-settings.js b/lib/types/messages/change-settings.js
--- a/lib/types/messages/change-settings.js
+++ b/lib/types/messages/change-settings.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -24,7 +24,7 @@
tShape<RawChangeSettingsMessageInfo>({
type: tNumber(messageTypes.CHANGE_SETTINGS),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
field: t.String,
value: t.union([t.String, t.Number]),
diff --git a/lib/types/messages/create-entry.js b/lib/types/messages/create-entry.js
--- a/lib/types/messages/create-entry.js
+++ b/lib/types/messages/create-entry.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -25,7 +25,7 @@
tShape<RawCreateEntryMessageInfo>({
type: tNumber(messageTypes.CREATE_ENTRY),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
entryID: tID,
date: t.String,
diff --git a/lib/types/messages/create-sidebar.js b/lib/types/messages/create-sidebar.js
--- a/lib/types/messages/create-sidebar.js
+++ b/lib/types/messages/create-sidebar.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { ThreadInfo } from '../minimally-encoded-thread-permissions-types.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -30,14 +30,14 @@
tShape<RawCreateSidebarMessageInfo>({
type: tNumber(messageTypes.CREATE_SIDEBAR),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
- sourceMessageAuthorID: t.String,
+ sourceMessageAuthorID: tUserID,
initialThreadState: tShape({
name: t.maybe(t.String),
parentThreadID: tID,
color: t.String,
- memberIDs: t.list(t.String),
+ memberIDs: t.list(tUserID),
}),
id: tID,
});
diff --git a/lib/types/messages/create-subthread.js b/lib/types/messages/create-subthread.js
--- a/lib/types/messages/create-subthread.js
+++ b/lib/types/messages/create-subthread.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { ThreadInfo } from '../minimally-encoded-thread-permissions-types.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -24,7 +24,7 @@
tShape<RawCreateSubthreadMessageInfo>({
type: tNumber(messageTypes.CREATE_SUB_THREAD),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
childThreadID: tID,
id: tID,
diff --git a/lib/types/messages/create-thread.js b/lib/types/messages/create-thread.js
--- a/lib/types/messages/create-thread.js
+++ b/lib/types/messages/create-thread.js
@@ -8,6 +8,7 @@
tNumber,
tNumEnum,
tShape,
+ tUserID,
} from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { ThreadInfo } from '../minimally-encoded-thread-permissions-types.js';
@@ -37,14 +38,14 @@
tShape<RawCreateThreadMessageInfo>({
type: tNumber(messageTypes.CREATE_THREAD),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
initialThreadState: tShape({
type: tNumEnum(values(threadTypes)),
name: t.maybe(t.String),
parentThreadID: t.maybe(tID),
color: t.String,
- memberIDs: t.list(t.String),
+ memberIDs: t.list(tUserID),
}),
id: tID,
});
diff --git a/lib/types/messages/delete-entry.js b/lib/types/messages/delete-entry.js
--- a/lib/types/messages/delete-entry.js
+++ b/lib/types/messages/delete-entry.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -25,7 +25,7 @@
tShape<RawDeleteEntryMessageInfo>({
type: tNumber(messageTypes.DELETE_ENTRY),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
entryID: tID,
date: t.String,
diff --git a/lib/types/messages/edit-entry.js b/lib/types/messages/edit-entry.js
--- a/lib/types/messages/edit-entry.js
+++ b/lib/types/messages/edit-entry.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -25,7 +25,7 @@
tShape<RawEditEntryMessageInfo>({
type: tNumber(messageTypes.EDIT_ENTRY),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
entryID: tID,
date: t.String,
diff --git a/lib/types/messages/edit.js b/lib/types/messages/edit.js
--- a/lib/types/messages/edit.js
+++ b/lib/types/messages/edit.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -24,7 +24,7 @@
tShape<RawEditMessageInfo>({
type: tNumber(messageTypes.EDIT_MESSAGE),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
targetMessageID: tID,
text: t.String,
diff --git a/lib/types/messages/images.js b/lib/types/messages/images.js
--- a/lib/types/messages/images.js
+++ b/lib/types/messages/images.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { imageValidator, type Image } from '../media-types.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -31,7 +31,7 @@
type: tNumber(messageTypes.IMAGES),
localID: t.maybe(t.String),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
media: t.list(imageValidator),
id: t.maybe(tID),
diff --git a/lib/types/messages/join-thread.js b/lib/types/messages/join-thread.js
--- a/lib/types/messages/join-thread.js
+++ b/lib/types/messages/join-thread.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -22,7 +22,7 @@
tShape<RawJoinThreadMessageInfo>({
type: tNumber(messageTypes.JOIN_THREAD),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
id: tID,
});
diff --git a/lib/types/messages/leave-thread.js b/lib/types/messages/leave-thread.js
--- a/lib/types/messages/leave-thread.js
+++ b/lib/types/messages/leave-thread.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -22,7 +22,7 @@
tShape<RawLeaveThreadMessageInfo>({
type: tNumber(messageTypes.LEAVE_THREAD),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
id: tID,
});
diff --git a/lib/types/messages/legacy-update-relationship.js b/lib/types/messages/legacy-update-relationship.js
--- a/lib/types/messages/legacy-update-relationship.js
+++ b/lib/types/messages/legacy-update-relationship.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -24,8 +24,8 @@
tShape<RawLegacyUpdateRelationshipMessageInfo>({
type: tNumber(messageTypes.LEGACY_UPDATE_RELATIONSHIP),
threadID: tID,
- creatorID: t.String,
- targetID: t.String,
+ creatorID: tUserID,
+ targetID: tUserID,
time: t.Number,
operation: t.enums.of(['request_sent', 'request_accepted']),
id: tID,
diff --git a/lib/types/messages/media.js b/lib/types/messages/media.js
--- a/lib/types/messages/media.js
+++ b/lib/types/messages/media.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tShape, tNumber, tID } from '../../utils/validation-utils.js';
+import { tShape, tNumber, tID, tUserID } from '../../utils/validation-utils.js';
import { type Media, mediaValidator } from '../media-types.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -31,7 +31,7 @@
type: tNumber(messageTypes.MULTIMEDIA),
localID: t.maybe(t.String),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
media: t.list(mediaValidator),
id: t.maybe(tID),
diff --git a/lib/types/messages/reaction.js b/lib/types/messages/reaction.js
--- a/lib/types/messages/reaction.js
+++ b/lib/types/messages/reaction.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -27,7 +27,7 @@
type: tNumber(messageTypes.REACTION),
localID: t.maybe(t.String),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
targetMessageID: tID,
reaction: t.String,
diff --git a/lib/types/messages/remove-members.js b/lib/types/messages/remove-members.js
--- a/lib/types/messages/remove-members.js
+++ b/lib/types/messages/remove-members.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -23,9 +23,9 @@
tShape<RawRemoveMembersMessageInfo>({
type: tNumber(messageTypes.REMOVE_MEMBERS),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
- removedUserIDs: t.list(t.String),
+ removedUserIDs: t.list(tUserID),
id: tID,
});
diff --git a/lib/types/messages/restore-entry.js b/lib/types/messages/restore-entry.js
--- a/lib/types/messages/restore-entry.js
+++ b/lib/types/messages/restore-entry.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -25,7 +25,7 @@
tShape<RawRestoreEntryMessageInfo>({
type: tNumber(messageTypes.RESTORE_ENTRY),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
entryID: tID,
date: t.String,
diff --git a/lib/types/messages/text.js b/lib/types/messages/text.js
--- a/lib/types/messages/text.js
+++ b/lib/types/messages/text.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -30,7 +30,7 @@
type: tNumber(messageTypes.TEXT),
localID: t.maybe(t.String),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
text: t.String,
id: t.maybe(tID),
diff --git a/lib/types/messages/toggle-pin.js b/lib/types/messages/toggle-pin.js
--- a/lib/types/messages/toggle-pin.js
+++ b/lib/types/messages/toggle-pin.js
@@ -2,7 +2,7 @@
import t, { type TInterface } from 'tcomb';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -28,7 +28,7 @@
targetMessageID: tID,
action: t.enums.of(['pin', 'unpin']),
pinnedContent: t.String,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
id: tID,
});
diff --git a/lib/types/messages/unsupported.js b/lib/types/messages/unsupported.js
--- a/lib/types/messages/unsupported.js
+++ b/lib/types/messages/unsupported.js
@@ -26,7 +26,7 @@
rawUpdateFarcasterRelationshipMessageInfoValidator,
type RawUpdateFarcasterRelationshipMessageInfo,
} from './update-relationship.js';
-import { tID, tNumber, tShape } from '../../utils/validation-utils.js';
+import { tID, tNumber, tShape, tUserID } from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -52,7 +52,7 @@
type: tNumber(messageTypes.UNSUPPORTED),
id: tID,
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
time: t.Number,
robotext: t.String,
dontPrefixCreator: t.maybe(t.Boolean),
diff --git a/lib/types/messages/update-relationship.js b/lib/types/messages/update-relationship.js
--- a/lib/types/messages/update-relationship.js
+++ b/lib/types/messages/update-relationship.js
@@ -2,7 +2,13 @@
import t, { type TInterface, type TUnion } from 'tcomb';
-import { tID, tNumber, tShape, tString } from '../../utils/validation-utils.js';
+import {
+ tID,
+ tNumber,
+ tShape,
+ tString,
+ tUserID,
+} from '../../utils/validation-utils.js';
import { messageTypes } from '../message-types-enum.js';
import type { RelativeUserInfo } from '../user-types.js';
@@ -55,8 +61,8 @@
id: tID,
type: tNumber(messageTypes.UPDATE_RELATIONSHIP),
threadID: tID,
- creatorID: t.String,
- targetID: t.String,
+ creatorID: tUserID,
+ targetID: tUserID,
time: t.Number,
operation: t.enums.of(['request_sent', 'request_accepted']),
});
@@ -66,9 +72,9 @@
id: tID,
type: tNumber(messageTypes.UPDATE_RELATIONSHIP),
threadID: tID,
- creatorID: t.String,
+ creatorID: tUserID,
creatorFID: t.String,
- targetID: t.String,
+ targetID: tUserID,
targetFID: t.String,
time: t.Number,
operation: tString('farcaster_mutual'),

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 7:40 AM (22 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2534286
Default Alt Text
D11962.diff (18 KB)

Event Timeline