implement mastodon push permission

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 = [