diff --git a/Cargo.lock b/Cargo.lock index 0d8d7f8519..583c3e9041 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -239,9 +239,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" dependencies = [ "addr2line", "cc", @@ -928,12 +928,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "flate2" version = "1.0.30" @@ -1123,9 +1117,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "group" @@ -1545,9 +1539,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.16" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" dependencies = [ "cc", "libc", @@ -1891,9 +1885,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" dependencies = [ "memchr", ] @@ -1938,9 +1932,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.3.0+3.3.0" +version = "300.3.1+3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba8804a1c5765b18c4b3f907e6897ebabeedebc9830e1a0046c4a4cf44663e1" +checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" dependencies = [ "cc", ] @@ -2029,9 +2023,9 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -3224,13 +3218,13 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] @@ -3478,9 +3472,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.13" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", @@ -3499,9 +3493,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.13" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ "indexmap", "serde", @@ -3591,6 +3585,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" + [[package]] name = "unicode-segmentation" version = "1.11.0" @@ -3982,9 +3982,9 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.6.8" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] @@ -4017,9 +4017,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zune-core" diff --git a/docs/api-change.md b/docs/api-change.md index 24a9d866a4..cc70b9dcf9 100644 --- a/docs/api-change.md +++ b/docs/api-change.md @@ -4,11 +4,14 @@ Breaking changes are indicated by the :warning: icon. ## Unreleased -- `GET` request is now allowed for the `latest-version` endpoint. - The old Mastodon API has been replaced with a new implementation based on Iceshrimp’s. - :warning: The new API uses a new format to manage Mastodon sessions in the database, whereas old implementation uses Misskey sessions. All previous client app and token registrations will not work with the new API. All clients need to be re-registered and all users need to re-authenticate. - :warning: All IDs (of statuses/notes, notifications, users, etc.) will be using the alphanumerical format, aligning with the Firefish/Misskey API. The old numerical IDs will not work when queried against the new API. +## v20240607 + +- `GET` request is now allowed for the `latest-version` endpoint. + ## v20240523 - Added `scheduledAt` optional parameter to `notes/create` (!10789) diff --git a/docs/changelog.md b/docs/changelog.md index 9b0fae8595..7946b6ea1d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -7,10 +7,6 @@ Critical security updates are indicated by the :warning: icon. ## Unreleased -- Add the ability to share posts via QR code -- Update the API document page (`/api-doc`) -- Fix bugs - - Ported Mastodon API support from Iceshrimp, with added Firefish extensions including push notifications, post languages, schedule post support, and more. - The old Mastodon API has been replaced with a new implementation based on Iceshrimp’s. @@ -19,6 +15,12 @@ Critical security updates are indicated by the :warning: icon. - The new Mastodon API uses a new format to manage Mastodon sessions in the database, whereas old implementation uses Misskey sessions. All previous client app and token registrations will not work with the new API. All clients need to be re-registered and all users need to re-authenticate. - All IDs (of statuses/notes, notifications, users, etc.) will be using the alphanumerical format, aligning with the Firefish/Misskey API. The old numerical IDs will not work when queried against the new API. +## [v20240607](https://firefish.dev/firefish/firefish/-/merge_requests/10978/commits) + +- Add the ability to share posts via QR code +- Update the API document page (`/api-doc`) +- Fix bugs + ## [v20240601](https://firefish.dev/firefish/firefish/-/merge_requests/10943/commits) - Fix bugs diff --git a/docs/notice-for-admins.md b/docs/notice-for-admins.md index b65a91a773..f919ff23ea 100644 --- a/docs/notice-for-admins.md +++ b/docs/notice-for-admins.md @@ -2,7 +2,7 @@ You can skip intermediate versions when upgrading from an old version, but please read the notices and follow the instructions for each intermediate version before [upgrading](./upgrade.md). -## Unreleased +## v20240607 The following environment variables are deprecated and no longer have any effect: - `MK_ONLY_QUEUE` diff --git a/package.json b/package.json index 33b13daa34..f2c7938d35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firefish", - "version": "20240601", + "version": "20240607", "repository": { "type": "git", "url": "https://firefish.dev/firefish/firefish.git" diff --git a/packages/backend-rs/index.d.ts b/packages/backend-rs/index.d.ts index 840191fc8e..920abc32dc 100644 --- a/packages/backend-rs/index.d.ts +++ b/packages/backend-rs/index.d.ts @@ -441,7 +441,7 @@ export function latestVersion(): Promise * Converts the given text into the cat language. * * refs: - * * + * * * * * * # Arguments diff --git a/packages/backend-rs/src/misc/nyaify.rs b/packages/backend-rs/src/misc/nyaify.rs index e9c5f414ca..1fcce19cef 100644 --- a/packages/backend-rs/src/misc/nyaify.rs +++ b/packages/backend-rs/src/misc/nyaify.rs @@ -6,7 +6,7 @@ use regex::{Captures, Regex}; /// Converts the given text into the cat language. /// /// refs: -/// * +/// * /// * /// /// # Arguments diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index d511ec9b48..4a33e64d5b 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -315,7 +315,7 @@ export function getNoteMenu(props: { }, !isAppearAuthor ? statePromise.then((state) => - state.isWatching + state?.isWatching ? { icon: `${icon("ph-eye-slash")}`, text: i18n.ts.unwatch, @@ -329,7 +329,7 @@ export function getNoteMenu(props: { ) : undefined, statePromise.then((state) => - state.isMutedThread + state?.isMutedThread ? { icon: `${icon("ph-speaker-x")}`, text: i18n.ts.unmuteThread, @@ -361,7 +361,7 @@ export function getNoteMenu(props: { action: () => showEditHistory(), } : undefined, - props.translationEl.canTranslate + props.translationEl?.canTranslate ? { icon: `${icon("ph-translate")}`, text: i18n.ts.translate, @@ -392,20 +392,30 @@ export function getNoteMenu(props: { text: i18n.ts.copyLink, action: copyLink, }, - appearNote.url || appearNote.uri + (appearNote.url ?? appearNote.uri) != null ? { icon: `${icon("ph-link-simple")}`, text: `${i18n.ts.copyLink} (${i18n.ts.origin})`, action: copyOriginal, } : undefined, - { - icon: `${icon("ph-qr-code")}`, - text: i18n.ts.getQrCode, - action: () => { - os.displayQrCode(`${url}/notes/${appearNote.id}`); - }, - }, + appearNote.user.host == null || + (appearNote.url ?? appearNote.uri) != null + ? { + icon: `${icon("ph-qr-code")}`, + text: + appearNote.user.host == null + ? i18n.ts.getQrCode + : `${i18n.ts.getQrCode} (${i18n.ts.origin})`, + action: () => { + os.displayQrCode( + appearNote.user.host == null + ? `${url}/notes/${appearNote.id}` + : appearNote.url ?? appearNote.uri, + ); + }, + } + : undefined, shareAvailable() ? { icon: `${icon("ph-share-network")}`, @@ -460,7 +470,7 @@ export function getNoteMenu(props: { isAppearAuthor && !( appearNote.visibility === "specified" && - appearNote.visibleUserIds.length === 0 + appearNote.visibleUserIds?.length === 0 ) ? { icon: `${icon("ph-eye-slash")}`, @@ -497,12 +507,12 @@ export function getNoteMenu(props: { ].filter((x) => x !== undefined); } else { menu = [ - appearNote.url || appearNote.uri + (appearNote.url ?? appearNote.uri) != null ? { icon: `${icon("ph-arrow-square-out")}`, text: i18n.ts.showOnRemote, action: () => { - window.open(appearNote.url || appearNote.uri, "_blank"); + window.open(appearNote.url ?? appearNote.uri, "_blank"); }, } : undefined, @@ -516,20 +526,29 @@ export function getNoteMenu(props: { text: i18n.ts.copyLink, action: copyLink, }, - appearNote.url || appearNote.uri + (appearNote.url ?? appearNote.uri) != null ? { icon: `${icon("ph-link-simple")}`, text: `${i18n.ts.copyLink} (${i18n.ts.origin})`, action: copyOriginal, } : undefined, - { - icon: `${icon("ph-qr-code")}`, - text: i18n.ts.getQrCode, - action: () => { - os.displayQrCode(`${url}/notes/${appearNote.id}`); - }, - }, + appearNote.user.host == null || (appearNote.url ?? appearNote.uri) != null + ? { + icon: `${icon("ph-qr-code")}`, + text: + appearNote.user.host == null + ? i18n.ts.getQrCode + : `${i18n.ts.getQrCode} (${i18n.ts.origin})`, + action: () => { + os.displayQrCode( + appearNote.user.host == null + ? `${url}/notes/${appearNote.id}` + : appearNote.url ?? appearNote.uri, + ); + }, + } + : undefined, shareAvailable() ? { icon: `${icon("ph-share-network")}`, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b85539573..88c57a43e0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1043,13 +1043,11 @@ packages: '@biomejs/cli-darwin-arm64@1.8.0': resolution: {integrity: sha512-dBAYzfIJ1JmWigKlWourT3sJ3I60LZPjqNwwlsyFjiv5AV7vPeWlHVVIImV2BpINwNjZQhpXnwDfVnGS4vr7AA==} engines: {node: '>=14.21.3'} - cpu: [arm64] os: [darwin] '@biomejs/cli-darwin-x64@1.8.0': resolution: {integrity: sha512-ZTTSD0bP0nn9UpRDGQrQNTILcYSj+IkxTYr3CAV64DWBDtQBomlk2oVKWzDaA1LOhpAsTh0giLCbPJaVk2jfMQ==} engines: {node: '>=14.21.3'} - cpu: [x64] os: [darwin] '@biomejs/cli-linux-arm64-musl@1.8.0': @@ -1061,7 +1059,6 @@ packages: '@biomejs/cli-linux-arm64@1.8.0': resolution: {integrity: sha512-cx725jTlJS6dskvJJwwCQaaMRBKE2Qss7ukzmx27Rn/DXRxz6tnnBix4FUGPf1uZfwrERkiJlbWM05JWzpvvXg==} engines: {node: '>=14.21.3'} - cpu: [arm64] os: [linux] '@biomejs/cli-linux-x64-musl@1.8.0': @@ -1073,7 +1070,6 @@ packages: '@biomejs/cli-linux-x64@1.8.0': resolution: {integrity: sha512-cmgmhlD4QUxMhL1VdaNqnB81xBHb3R7huVNyYnPYzP+AykZ7XqJbPd1KcWAszNjUk2AHdx0aLKEBwCOWemxb2g==} engines: {node: '>=14.21.3'} - cpu: [x64] os: [linux] '@biomejs/cli-win32-arm64@1.8.0': diff --git a/renovate.json b/renovate.json index d03d163067..387ad4d8f5 100644 --- a/renovate.json +++ b/renovate.json @@ -10,6 +10,7 @@ "ignorePaths": ["packages/backend-rs/npm"], "lockFileMaintenance": { "enabled": true, + "automerge": true, "recreateWhen": "always", "rebaseWhen": "behind-base-branch", "branchTopic": "lock-file-maintenance",