Merge branch 'develop'
This commit is contained in:
commit
0fb528ddf8
7 changed files with 15 additions and 39 deletions
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "misskey",
|
||||
"author": "syuilo <i@syuilo.com>",
|
||||
"version": "8.21.0",
|
||||
"clientVersion": "1.0.9259",
|
||||
"version": "8.21.1",
|
||||
"clientVersion": "1.0.9264",
|
||||
"codename": "nighthike",
|
||||
"main": "./built/index.js",
|
||||
"private": true,
|
||||
|
|
|
@ -48,7 +48,7 @@ export default Vue.extend({
|
|||
const mouseY = e.clientY - rect.top;
|
||||
const xp = mouseX / this.$el.offsetWidth * 100;
|
||||
const yp = mouseY / this.$el.offsetHeight * 100;
|
||||
this.$el.style.backgroundPosition = `${xp}% ${yp}%';
|
||||
this.$el.style.backgroundPosition = `${xp}% ${yp}%`;
|
||||
this.$el.style.backgroundImage = `url("${this.image.url}")`;
|
||||
},
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ import Logger from './misc/logger';
|
|||
import ProgressBar from './misc/cli/progressbar';
|
||||
import EnvironmentInfo from './misc/environmentInfo';
|
||||
import MachineInfo from './misc/machineInfo';
|
||||
import DependencyInfo from './misc/dependencyInfo';
|
||||
import serverStats from './daemons/server-stats';
|
||||
import notesStats from './daemons/notes-stats';
|
||||
import loadConfig from './config/load';
|
||||
|
@ -116,7 +115,6 @@ async function init(): Promise<Config> {
|
|||
new Logger('Deps').info(`Node.js ${process.version}`);
|
||||
MachineInfo.show();
|
||||
EnvironmentInfo.show();
|
||||
new DependencyInfo().showAll();
|
||||
|
||||
const configLogger = new Logger('Config');
|
||||
let config;
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
import Logger from './logger';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
export default class {
|
||||
private logger: Logger;
|
||||
|
||||
constructor() {
|
||||
this.logger = new Logger('Deps');
|
||||
}
|
||||
|
||||
public showAll(): void {
|
||||
this.show('MongoDB', 'mongo --version', x => x.match(/^MongoDB shell version:? v(.*)\r?\n/));
|
||||
this.show('Redis', 'redis-server --version', x => x.match(/v=([0-9\.]*)/));
|
||||
}
|
||||
|
||||
public show(serviceName: string, command: string, transform: (x: string) => RegExpMatchArray): void {
|
||||
try {
|
||||
// ステータス0以外のときにexecSyncはstderrをコンソール上に出力してしまうので
|
||||
// プロセスからのstderrをすべて無視するように stdio オプションをセット
|
||||
const x = execSync(command, { stdio: ['pipe', 'pipe', 'ignore'] });
|
||||
const ver = transform(x.toString());
|
||||
if (ver != null) {
|
||||
this.logger.succ(`${serviceName} ${ver[1]} found`);
|
||||
} else {
|
||||
this.logger.warn(`${serviceName} not found`);
|
||||
this.logger.warn(`Regexp used for version check of ${serviceName} is probably messed up`);
|
||||
}
|
||||
} catch (e) {
|
||||
this.logger.warn(`${serviceName} not found`);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -193,5 +193,10 @@ export const pack = (
|
|||
*/
|
||||
}
|
||||
|
||||
delete _target.withoutChunks;
|
||||
delete _target.storage;
|
||||
delete _target.storageProps;
|
||||
delete _target.isRemote;
|
||||
|
||||
resolve(_target);
|
||||
});
|
||||
|
|
4
src/remote/activitypub/renderer/tombstone.ts
Normal file
4
src/remote/activitypub/renderer/tombstone.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
export default (id: string) => ({
|
||||
id,
|
||||
type: 'Tombstone'
|
||||
});
|
|
@ -5,8 +5,9 @@ import renderDelete from '../../remote/activitypub/renderer/delete';
|
|||
import pack from '../../remote/activitypub/renderer';
|
||||
import { deliver } from '../../queue';
|
||||
import Following from '../../models/following';
|
||||
import renderNote from '../../remote/activitypub/renderer/note';
|
||||
import renderTombstone from '../../remote/activitypub/renderer/tombstone';
|
||||
import { updateNoteStats } from '../update-chart';
|
||||
import config from '../../config';
|
||||
|
||||
/**
|
||||
* 投稿を削除します。
|
||||
|
@ -32,7 +33,7 @@ export default async function(user: IUser, note: INote) {
|
|||
|
||||
//#region ローカルの投稿なら削除アクティビティを配送
|
||||
if (isLocalUser(user)) {
|
||||
const content = pack(renderDelete(await renderNote(note), user));
|
||||
const content = pack(renderDelete(renderTombstone(`${config.url}/notes/${note._id}`), user));
|
||||
|
||||
const followings = await Following.find({
|
||||
followeeId: user._id,
|
||||
|
|
Loading…
Reference in a new issue