Compare commits

...

5 Commits

Author SHA1 Message Date
syuilo 459add1902 Update CHANGELOG.md 2025-05-09 17:39:17 +09:00
syuilo 3431ea24c8 Update CHANGELOG.md 2025-05-09 17:38:03 +09:00
syuilo 4440e2ebf5 Update CHANGELOG.md 2025-05-09 17:37:01 +09:00
syuilo a470eba6d5 Merge branch 'develop' into no-websocket 2025-05-09 17:31:43 +09:00
syuilo 5603cb7e22 refactor 2025-05-07 16:10:43 +09:00
4 changed files with 10 additions and 5 deletions

View File

@ -4,7 +4,12 @@
-
### Client
-
- Feat: Websocket接続を行わずにMisskeyを利用するNo Websocketモードが実装されました(beta)
- サーバーのパフォーマンス向上に寄与することが期待されます
- 何らの理由によりWebsocket接続が行えない環境でも快適に利用可能です
- 従来のWebsocket接続を行うモードはリアルタイムモードとして再定義されました
- チャットなど、一部の機能は引き続き設定に関わらずWebsocket接続が行われます
- Enhance: メモリ使用量を軽減しました
### Server
-

View File

@ -86,7 +86,7 @@ const storageProvider: StorageProvider = {
});
},
cloudGets: async (ctx) => {
cloudGetBulk: async (ctx) => {
// TODO: 値の取得を1つのリクエストで済ませたい(バックエンド側でAPIの新設が必要)
const fetchings = ctx.needs.map(need => storageProvider.cloudGet(need).then(res => [need.key, res] as const));
const cloudDatas = await Promise.all(fetchings);

View File

@ -79,7 +79,7 @@ export type PreferencesProfile = {
export type StorageProvider = {
save: (ctx: { profile: PreferencesProfile; }) => void;
cloudGets: <K extends keyof PREF>(ctx: { needs: { key: K; scope: Scope; }[] }) => Promise<Partial<Record<K, ValueOf<K>>>>;
cloudGetBulk: <K extends keyof PREF>(ctx: { needs: { key: K; scope: Scope; }[] }) => Promise<Partial<Record<K, ValueOf<K>>>>;
cloudGet: <K extends keyof PREF>(ctx: { key: K; scope: Scope; }) => Promise<{ value: ValueOf<K>; } | null>;
cloudSet: <K extends keyof PREF>(ctx: { key: K; scope: Scope; value: ValueOf<K>; }) => Promise<void>;
};
@ -240,7 +240,7 @@ export class PreferencesManager {
}
}
const cloudValues = await this.storageProvider.cloudGets({ needs });
const cloudValues = await this.storageProvider.cloudGetBulk({ needs });
for (const _key in PREF_DEF) {
const key = _key as keyof PREF;

View File

@ -140,7 +140,7 @@ function importProfile() {
export async function cloudBackup() {
if ($i == null) return;
if (!canAutoBackup()) {
throw new Error('Profile name is not set');
throw new Error('cannot auto backup for this profile');
}
await misskeyApi('i/registry/set', {