implement mastodon push permission
Some checks failed
Lint / pnpm_install (pull_request) Successful in 33s
API report (misskey.js) / report (pull_request) Failing after 42s
Test (misskey.js) / test (22.x) (pull_request) Successful in 53s
Test (frontend) / vitest (22.x) (pull_request) Successful in 1m25s
Test (production install and build) / production (22.x) (pull_request) Successful in 1m5s
Lint / lint (backend) (pull_request) Successful in 1m3s
Test (backend) / validate-api-json (22.x) (pull_request) Successful in 1m25s
Lint / lint (misskey-js) (pull_request) Successful in 34s
Lint / lint (sw) (pull_request) Successful in 31s
Test (backend) / unit (22.x) (pull_request) Successful in 2m38s
Lint / typecheck (misskey-js) (pull_request) Successful in 34s
Lint / typecheck (backend) (pull_request) Successful in 1m26s
Test (backend) / e2e (22.x) (pull_request) Successful in 6m34s
Lint / lint (frontend) (pull_request) Successful in 7m54s

currently doesn't do anything, but it's necessary for masto-fe to be
able to sign in
This commit is contained in:
sugar 2025-02-07 21:32:00 +01:00
parent 9443b99399
commit 61db718bae
4 changed files with 4 additions and 1 deletions

View file

@ -2243,6 +2243,7 @@ _permissions:
"read:clip-favorite": "View favorited clips"
"read:federation": "Get federation data"
"write:report-abuse": "Report violation"
"write:push-notification": "Receive push notifications"
_auth:
shareAccessTitle: "Granting application permissions"
shareAccess: "Would you like to authorize \"{name}\" to access this account?"

View file

@ -72,7 +72,7 @@ export function build() {
.reduce((a, [k, v]) => (a[k] = (() => {
const [lang] = k.split('-');
switch (k) {
case 'ja-JP': return v;
case 'ja-JP': return merge(locales['en-US'], v);
case 'ja-KS':
case 'en-US': return merge(locales['ja-JP'], v);
default: return merge(

View file

@ -3,6 +3,7 @@ import { permissions } from 'misskey-js';
const mastodonToMisskeyScopes: Map<string, (typeof permissions)[number][]> = new Map([
['profile', ['read:account']],
['follow', ['read:following', 'write:following', 'read:blocks', 'write:blocks', 'read:mutes', 'write:mutes']],
['push', ['write:push-notification']],
['read:accounts', ['read:account']],
['read:blocks', ['read:blocks']],
['read:bookmarks', ['read:favorites']],

View file

@ -103,6 +103,7 @@ export const permissions = [
'read:clip-favorite',
'read:federation',
'write:report-abuse',
'write:push-notification', // Mastodon permission
] as const;
export const moderationLogTypes = [