From 4155f297b819aa8363de1a72d325bff4044049ba Mon Sep 17 00:00:00 2001 From: yuchiki <14884013+yuchiki@users.noreply.github.com> Date: Wed, 15 Mar 2023 01:17:40 +0000 Subject: [PATCH 1/5] sw typechecks successfully now. --- packages/sw/src/scripts/create-notification.ts | 2 +- packages/sw/src/scripts/operations.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/sw/src/scripts/create-notification.ts b/packages/sw/src/scripts/create-notification.ts index 6286d076c7d..a43b746d289 100644 --- a/packages/sw/src/scripts/create-notification.ts +++ b/packages/sw/src/scripts/create-notification.ts @@ -170,7 +170,7 @@ async function composeNotification(data: pushNotificationDataMap[keyof pushNotif case 'pollEnded': return [t('_notification.pollEnded'), { - body: data.body.note.text || '', + body: data.body.note.text ?? '', badge: iconUrl('chart-arrows'), tag: `poll:${data.body.note.id}`, data, diff --git a/packages/sw/src/scripts/operations.ts b/packages/sw/src/scripts/operations.ts index 8936a7763af..df3c054a655 100644 --- a/packages/sw/src/scripts/operations.ts +++ b/packages/sw/src/scripts/operations.ts @@ -4,7 +4,6 @@ */ import * as Misskey from 'misskey-js'; import { SwMessage, swMessageOrderType } from '@/types'; -import { acct as getAcct } from '@/filters/user'; import { getAccountFromId } from '@/scripts/get-account-from-id'; import { getUrlWithLoginId } from '@/scripts/login-id'; From 274618530a92b85e395cd9247a81b5571e8354e2 Mon Sep 17 00:00:00 2001 From: yuchiki <14884013+yuchiki@users.noreply.github.com> Date: Wed, 15 Mar 2023 01:21:54 +0000 Subject: [PATCH 2/5] lint at ci --- .github/workflows/lint.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1c6615e17f1..9d14612c359 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -62,7 +62,11 @@ jobs: matrix: workspace: - backend +<<<<<<< HEAD - misskey-js +======= + - sw +>>>>>>> lint at ci steps: - uses: actions/checkout@v3.3.0 with: From 7967a75259cc7662df9f4e4d135dc3cf8b3fe188 Mon Sep 17 00:00:00 2001 From: yuchiki <14884013+yuchiki@users.noreply.github.com> Date: Tue, 4 Apr 2023 12:55:18 +0000 Subject: [PATCH 3/5] fidx entitities.ts --- .github/workflows/lint.yml | 3 --- packages/misskey-js/src/entities.ts | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9d14612c359..37f10a0af63 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -62,11 +62,8 @@ jobs: matrix: workspace: - backend -<<<<<<< HEAD - misskey-js -======= - sw ->>>>>>> lint at ci steps: - uses: actions/checkout@v3.3.0 with: diff --git a/packages/misskey-js/src/entities.ts b/packages/misskey-js/src/entities.ts index 7343fd74ad9..305f2b2e439 100644 --- a/packages/misskey-js/src/entities.ts +++ b/packages/misskey-js/src/entities.ts @@ -1,3 +1,5 @@ +import { type } from 'os'; + export type ID = string; export type DateString = string; @@ -36,7 +38,7 @@ export type UserDetailed = UserLite & { createdAt: DateString; description: string | null; ffVisibility: 'public' | 'followers' | 'private'; - fields: {name: string; value: string}[]; + fields: { name: string; value: string }[]; followersCount: number; followingCount: number; hasPendingFollowRequestFromYou: boolean; @@ -217,6 +219,9 @@ export type Notification = { user: User; userId: User['id']; note: Note; +} | { + type: 'pollEnded'; + note: Note; } | { type: 'follow'; user: User; From d10489dde7932be10735d18c83479b55e516a6b6 Mon Sep 17 00:00:00 2001 From: yuchiki <14884013+yuchiki@users.noreply.github.com> Date: Tue, 4 Apr 2023 14:04:40 +0000 Subject: [PATCH 4/5] update api.md --- packages/misskey-js/etc/misskey-js.api.md | 5 ++++- packages/misskey-js/src/entities.ts | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index 2511f14dcc5..ef513ba9980 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -2484,6 +2484,9 @@ type Notification_2 = { user: User; userId: User['id']; note: Note; +} | { + type: 'pollEnded'; + note: Note; } | { type: 'follow'; user: User; @@ -2710,7 +2713,7 @@ type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+u // src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts // src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts // src/api.types.ts:594:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts -// src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts +// src/streaming.types.ts:35:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/packages/misskey-js/src/entities.ts b/packages/misskey-js/src/entities.ts index 305f2b2e439..d473dc0a706 100644 --- a/packages/misskey-js/src/entities.ts +++ b/packages/misskey-js/src/entities.ts @@ -1,5 +1,3 @@ -import { type } from 'os'; - export type ID = string; export type DateString = string; @@ -38,7 +36,7 @@ export type UserDetailed = UserLite & { createdAt: DateString; description: string | null; ffVisibility: 'public' | 'followers' | 'private'; - fields: { name: string; value: string }[]; + fields: {name: string; value: string}[]; followersCount: number; followingCount: number; hasPendingFollowRequestFromYou: boolean; From b6eb18bd4908eb0aa23b494fbdea40119e066ab7 Mon Sep 17 00:00:00 2001 From: yuchiki <14884013+yuchiki@users.noreply.github.com> Date: Thu, 6 Apr 2023 14:57:43 +0000 Subject: [PATCH 5/5] follow latest develop --- packages/misskey-js/etc/misskey-js.api.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index ef513ba9980..55a8a0b04a1 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -166,6 +166,8 @@ export type Channels = { readAllAntennas: () => void; unreadAntenna: (payload: Antenna) => void; readAllAnnouncements: () => void; + readAllChannels: () => void; + unreadChannel: (payload: Note['id']) => void; myTokenRegenerated: () => void; reversiNoInvites: () => void; reversiInvited: (payload: FIXME) => void; @@ -2353,6 +2355,7 @@ type MeDetailed = UserDetailed & { hasPendingReceivedFollowRequest: boolean; hasUnreadAnnouncement: boolean; hasUnreadAntenna: boolean; + hasUnreadChannel: boolean; hasUnreadMentions: boolean; hasUnreadMessagingMessage: boolean; hasUnreadNotification: boolean; @@ -2612,11 +2615,7 @@ export class Stream extends EventEmitter { // (undocumented) removeSharedConnectionPool(pool: Pool): void; // (undocumented) - send(typeOrPayload: string): void; - // (undocumented) - send(typeOrPayload: string, payload: any): void; - // (undocumented) - send(typeOrPayload: Record | any[]): void; + send(typeOrPayload: any, payload?: any): void; // (undocumented) state: 'initializing' | 'reconnecting' | 'connected'; // (undocumented)