parent
acc6f54557
commit
c81a94ff75
|
@ -22,7 +22,7 @@ export default function(type, data): Notification {
|
||||||
|
|
||||||
case 'unreadMessagingMessage':
|
case 'unreadMessagingMessage':
|
||||||
return {
|
return {
|
||||||
title: '%i18n:common.notification.message-from%'.split("{}")[0] + `${getUserName(data.user)}` + '%i18n:common.notification.message-from%'.split("{}")[1] ,
|
title: '%i18n:common.notification.message-from%'.split('{}')[0] + `${getUserName(data.user)}` + '%i18n:common.notification.message-from%'.split('{}')[1] ,
|
||||||
body: data.text, // TODO: getMessagingMessageSummary(data),
|
body: data.text, // TODO: getMessagingMessageSummary(data),
|
||||||
icon: data.user.avatarUrl
|
icon: data.user.avatarUrl
|
||||||
};
|
};
|
||||||
|
@ -30,7 +30,7 @@ export default function(type, data): Notification {
|
||||||
case 'reversiInvited':
|
case 'reversiInvited':
|
||||||
return {
|
return {
|
||||||
title: '%i18n:common.notification.reversi-invited%',
|
title: '%i18n:common.notification.reversi-invited%',
|
||||||
body: '%i18n:common.notification.reversi-invited-by%'.split("{}")[0] + `${getUserName(data.parent)}` + '%i18n:common.notification.reversi-invited-by%'.split("{}")[1],
|
body: '%i18n:common.notification.reversi-invited-by%'.split('{}')[0] + `${getUserName(data.parent)}` + '%i18n:common.notification.reversi-invited-by%'.split('{}')[1],
|
||||||
icon: data.parent.avatarUrl
|
icon: data.parent.avatarUrl
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,21 +38,21 @@ export default function(type, data): Notification {
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case 'mention':
|
case 'mention':
|
||||||
return {
|
return {
|
||||||
title: '%i18n:common.notification.notified-by%'.split("{}")[0] + `${getUserName(data.user)}:` + '%i18n:common.notification.notified-by%'.split("{}")[1],
|
title: '%i18n:common.notification.notified-by%'.split('{}')[0] + `${getUserName(data.user)}:` + '%i18n:common.notification.notified-by%'.split('{}')[1],
|
||||||
body: getNoteSummary(data),
|
body: getNoteSummary(data),
|
||||||
icon: data.user.avatarUrl
|
icon: data.user.avatarUrl
|
||||||
};
|
};
|
||||||
|
|
||||||
case 'reply':
|
case 'reply':
|
||||||
return {
|
return {
|
||||||
title: '%i18n:common.notification.reply-from%'.split("{}")[0] + `${getUserName(data.user)}` + '%i18n:common.notification.reply-from%'.split("{}")[1],
|
title: '%i18n:common.notification.reply-from%'.split('{}')[0] + `${getUserName(data.user)}` + '%i18n:common.notification.reply-from%'.split('{}')[1],
|
||||||
body: getNoteSummary(data),
|
body: getNoteSummary(data),
|
||||||
icon: data.user.avatarUrl
|
icon: data.user.avatarUrl
|
||||||
};
|
};
|
||||||
|
|
||||||
case 'quote':
|
case 'quote':
|
||||||
return {
|
return {
|
||||||
title: '%i18n:common.notification.quoted-by%'.split("{}")[0] + `${getUserName(data.user)}` + '%i18n:common.notification.quoted-by%'.split("{}")[1],
|
title: '%i18n:common.notification.quoted-by%'.split('{}')[0] + `${getUserName(data.user)}` + '%i18n:common.notification.quoted-by%'.split('{}')[1],
|
||||||
body: getNoteSummary(data),
|
body: getNoteSummary(data),
|
||||||
icon: data.user.avatarUrl
|
icon: data.user.avatarUrl
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default function(sec) {
|
||||||
const t
|
const t
|
||||||
= tod < 60 ? `${Math.floor(tod)} sec`
|
= tod < 60 ? `${Math.floor(tod)} sec`
|
||||||
: tod < 3600 ? `${Math.floor(tod / 60)} min`
|
: tod < 3600 ? `${Math.floor(tod / 60)} min`
|
||||||
: `${Math.floor(tod / 60 / 60)}:${Math.floor((tod / 60) % 60).toString().padStart(2, "0")}`;
|
: `${Math.floor(tod / 60 / 60)}:${Math.floor((tod / 60) % 60).toString().padStart(2, '0')}`;
|
||||||
|
|
||||||
let str = '';
|
let str = '';
|
||||||
if (d) str += `${d}, `;
|
if (d) str += `${d}, `;
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
export default (data: ArrayBuffer) => {
|
export default (data: ArrayBuffer) => {
|
||||||
//const buf = new Buffer(data);
|
//const buf = new Buffer(data);
|
||||||
//const hash = crypto.createHash("md5");
|
//const hash = crypto.createHash('md5');
|
||||||
//hash.update(buf);
|
//hash.update(buf);
|
||||||
//return hash.digest("hex");
|
//return hash.digest('hex');
|
||||||
return '';
|
return '';
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
declare module "*.vue" {
|
declare module '*.vue' {
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
export default Vue;
|
export default Vue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { count, concat } from "../../prelude/array";
|
import { count, concat } from '../../prelude/array';
|
||||||
|
|
||||||
// MISSKEY REVERSI ENGINE
|
// MISSKEY REVERSI ENGINE
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { capitalize, toUpperCase } from "../prelude/string";
|
import { capitalize, toUpperCase } from '../prelude/string';
|
||||||
|
|
||||||
function escape(text: string) {
|
function escape(text: string) {
|
||||||
return text
|
return text
|
||||||
|
|
|
@ -17,7 +17,7 @@ const defaultMeta: any = {
|
||||||
enableGithubIntegration: false,
|
enableGithubIntegration: false,
|
||||||
enableDiscordIntegration: false,
|
enableDiscordIntegration: false,
|
||||||
enableExternalUserRecommendation: false,
|
enableExternalUserRecommendation: false,
|
||||||
externalUserRecommendationEngine: "https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-misskey-api.cgi?{{host}}+{{user}}+{{limit}}+{{offset}}",
|
externalUserRecommendationEngine: 'https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-misskey-api.cgi?{{host}}+{{user}}+{{limit}}+{{offset}}',
|
||||||
externalUserRecommendationTimeout: 300000,
|
externalUserRecommendationTimeout: 300000,
|
||||||
errorImageUrl: 'https://ai.misskey.xyz/aiart/yubitun.png'
|
errorImageUrl: 'https://ai.misskey.xyz/aiart/yubitun.png'
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export function concat(xs: string[]): string {
|
export function concat(xs: string[]): string {
|
||||||
return xs.reduce((a, b) => a + b, "");
|
return xs.reduce((a, b) => a + b, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
export function capitalize(s: string): string {
|
export function capitalize(s: string): string {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { IIcon } from "./icon";
|
import { IIcon } from './icon';
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* tag (ActivityPub)
|
* tag (ActivityPub)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import config from '../../../config';
|
import config from '../../../config';
|
||||||
import { ILocalUser, IRemoteUser } from "../../../models/user";
|
import { ILocalUser, IRemoteUser } from '../../../models/user';
|
||||||
|
|
||||||
export default (blocker?: ILocalUser, blockee?: IRemoteUser) => ({
|
export default (blocker?: ILocalUser, blockee?: IRemoteUser) => ({
|
||||||
type: 'Block',
|
type: 'Block',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import config from '../../../config';
|
import config from '../../../config';
|
||||||
import { ILocalUser } from "../../../models/user";
|
import { ILocalUser } from '../../../models/user';
|
||||||
|
|
||||||
export default (object: any, user: ILocalUser) => ({
|
export default (object: any, user: ILocalUser) => ({
|
||||||
type: 'Delete',
|
type: 'Delete',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import config from '../../../config';
|
import config from '../../../config';
|
||||||
import { ILocalUser, IUser } from "../../../models/user";
|
import { ILocalUser, IUser } from '../../../models/user';
|
||||||
|
|
||||||
export default (object: any, user: ILocalUser | IUser) => ({
|
export default (object: any, user: ILocalUser | IUser) => ({
|
||||||
type: 'Undo',
|
type: 'Undo',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as debug from 'debug';
|
import * as debug from 'debug';
|
||||||
import Emoji from "../models/emoji";
|
import Emoji from '../models/emoji';
|
||||||
|
|
||||||
debug.enable('*');
|
debug.enable('*');
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import parseAcct from "../misc/acct/parse";
|
import parseAcct from '../misc/acct/parse';
|
||||||
import resolveUser from '../remote/resolve-user';
|
import resolveUser from '../remote/resolve-user';
|
||||||
import * as debug from 'debug';
|
import * as debug from 'debug';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue