Compare commits

..

14 Commits

Author SHA1 Message Date
syuilo
8ccbabf5ca 5.22.1 2018-08-12 03:09:45 +09:00
syuilo
7c763600b7 Fix #2162 2018-08-12 03:09:22 +09:00
Aya Morisawa
3a77d871d5 Stop supporting docker 2018-08-12 00:30:58 +09:00
Aya Morisawa
4ee6d0b549 Refactoring (#2160) 2018-08-12 00:01:07 +09:00
syuilo
c8c4ec6ad4 5.22.0 2018-08-11 21:35:22 +09:00
syuilo
c9ee737078 Fix bug 2018-08-11 21:34:12 +09:00
syuilo
ebc2cca0b4 New Crowdin translations (#2158) 2018-08-11 21:29:07 +09:00
syuilo
fc94df06eb New Crowdin translations (#2157) 2018-08-11 21:13:38 +09:00
syuilo
4a5e145048 Add new reaction: rip 😇 2018-08-11 21:08:34 +09:00
syuilo
be68f42220 Implement messaging/messages/read 2018-08-11 21:01:39 +09:00
syuilo
7942aa677f Update doc 2018-08-11 21:01:26 +09:00
syuilo
2fcf9288a5 Refactoring 2018-08-11 20:53:03 +09:00
MeiMei
9bc17974f2 未利用時はTwitterでログインを表示しない (#2156) 2018-08-11 20:20:35 +09:00
MeiMei
a8f142096c Cache failed url-preview (apply to proxy/client) (#2154) 2018-08-11 18:04:59 +09:00
33 changed files with 91 additions and 88 deletions

View File

@@ -1,26 +0,0 @@
FROM base/archlinux
MAINTAINER Aya Morisawa
RUN rm /etc/pacman.d/mirrorlist
RUN echo 'Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
RUN echo 'Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
RUN rm /etc/localtime
RUN ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
RUN pacman -Sy --noconfirm
RUN pacman -S --noconfirm pacman
RUN pacman-db-upgrade
RUN pacman -S --noconfirm archlinux-keyring
RUN pacman -Syyu --noconfirm
RUN pacman -S --noconfirm git nodejs npm mongodb redis
COPY misskey.sh /root/misskey.sh
RUN chmod u+x /root/misskey.sh
EXPOSE 80
EXPOSE 443
EXPOSE 27017
CMD ["/root/misskey.sh"]

View File

@@ -1,6 +0,0 @@
#!/bin/sh
redis-server --daemonize yes
mongod > /dev/null &
cd /root/misskey
npm start
tail -f /dev/null

View File

@@ -1,29 +0,0 @@
Setup with Docker :whale:
================================================================
Ensure that the working directory is the repository root directory.
To create misskey image:
``` console
$ sudo docker build -t misskey ./docker
```
To run misskey:
``` console
$ sudo docker run --rm -i -t -p $PORT:80 -v $(pwd):/root/misskey -v $DBPATH:/data/db misskey
```
where `$PORT` is the port used to access Misskey Web from host browser
and `$DBPATH` is the path of MongoDB database on the host for data persistence.
ex:
``` console
$ sudo docker run --rm -i -t -p 80:80 -v $(pwd):/root/misskey -v /data/db:/data/db misskey
```
If you want to run misskey in production mode, add `--env NODE_ENV=production` like this:
``` console
$ sudo docker run --rm -i -t -p 80:80 -v $(pwd):/root/misskey -v /data/db:/data/db --env NODE_ENV=production misskey
```
Note that `$(pwd)` is the working directory.

View File

@@ -66,6 +66,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "今どうしてる?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "Glückwunsch!"
angry: "Wütend"
confused: "Verwirrt"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "Was machst du gerade?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "Congrats!"
angry: "Angry"
confused: "Confused"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "What are you doing?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "felicidades"
angry: "enfadado"
confused: "confundido"
rip: "RIP"
pudding: "Chafado"
note-placeholders:
a: "¿Qué haces?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "Félicitations !"
angry: "En colère"
confused: "Confus"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "Que faîtes vous maintenant ?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "今どうしてる?"

View File

@@ -70,6 +70,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:

View File

@@ -66,6 +66,7 @@ common:
congrats: "받으세요"
angry: "화냈어"
confused: "곤란하고 있어"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "지금 어떻게하고있어?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "Gratuluję!"
angry: "Wściekły"
confused: "Zmieszany"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "Co robisz?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "今どうしてる?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "今どうしてる?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "今どうしてる?"

View File

@@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "5.21.0",
"clientVersion": "1.0.8117",
"version": "5.22.1",
"clientVersion": "1.0.8127",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,

View File

@@ -8,6 +8,7 @@
<img v-if="reaction == 'congrats'" src="/assets/reactions/congrats.png" alt="%i18n:common.reactions.congrats%">
<img v-if="reaction == 'angry'" src="/assets/reactions/angry.png" alt="%i18n:common.reactions.angry%">
<img v-if="reaction == 'confused'" src="/assets/reactions/confused.png" alt="%i18n:common.reactions.confused%">
<img v-if="reaction == 'rip'" src="/assets/reactions/rip.png" alt="%i18n:common.reactions.rip%">
<template v-if="reaction == 'pudding'">
<img v-if="$store.getters.isSignedIn && $store.state.settings.iLikeSushi" src="/assets/reactions/sushi.png" alt="%i18n:common.reactions.pudding%">
<img v-else src="/assets/reactions/pudding.png" alt="%i18n:common.reactions.pudding%">

View File

@@ -10,9 +10,10 @@
<button @click="react('hmm')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="4" title="%i18n:common.reactions.hmm%"><mk-reaction-icon reaction='hmm'/></button>
<button @click="react('surprise')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="5" title="%i18n:common.reactions.surprise%"><mk-reaction-icon reaction='surprise'/></button>
<button @click="react('congrats')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="6" title="%i18n:common.reactions.congrats%"><mk-reaction-icon reaction='congrats'/></button>
<button @click="react('angry')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="4" title="%i18n:common.reactions.angry%"><mk-reaction-icon reaction='angry'/></button>
<button @click="react('confused')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="5" title="%i18n:common.reactions.confused%"><mk-reaction-icon reaction='confused'/></button>
<button @click="react('pudding')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="6" title="%i18n:common.reactions.pudding%"><mk-reaction-icon reaction='pudding'/></button>
<button @click="react('angry')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="7" title="%i18n:common.reactions.angry%"><mk-reaction-icon reaction='angry'/></button>
<button @click="react('confused')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="8" title="%i18n:common.reactions.confused%"><mk-reaction-icon reaction='confused'/></button>
<button @click="react('rip')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="9" title="%i18n:common.reactions.rip%"><mk-reaction-icon reaction='rip'/></button>
<button @click="react('pudding')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="10" title="%i18n:common.reactions.pudding%"><mk-reaction-icon reaction='pudding'/></button>
</div>
</div>
</div>

View File

@@ -9,6 +9,7 @@
<span v-if="reactions.congrats"><mk-reaction-icon reaction="congrats"/><span>{{ reactions.congrats }}</span></span>
<span v-if="reactions.angry"><mk-reaction-icon reaction="angry"/><span>{{ reactions.angry }}</span></span>
<span v-if="reactions.confused"><mk-reaction-icon reaction="confused"/><span>{{ reactions.confused }}</span></span>
<span v-if="reactions.rip"><mk-reaction-icon reaction="rip"/><span>{{ reactions.rip }}</span></span>
<span v-if="reactions.pudding"><mk-reaction-icon reaction="pudding"/><span>{{ reactions.pudding }}</span></span>
</template>
</div>

View File

@@ -12,13 +12,13 @@
</ui-input>
<ui-input v-if="user && user.twoFactorEnabled" v-model="token" type="number" required/>
<ui-button type="submit" :disabled="signing">{{ signing ? '%i18n:@signing-in%' : '%i18n:@signin%' }}</ui-button>
<p style="margin: 8px 0;">%i18n:@or%<a :href="`${apiUrl}/signin/twitter`">%i18n:@signin-with-twitter%</a></p>
<p style="margin: 8px 0;" v-if="twitterIntegration">%i18n:@or%<a :href="`${apiUrl}/signin/twitter`">%i18n:@signin-with-twitter%</a></p>
</form>
</template>
<script lang="ts">
import Vue from 'vue';
import { apiUrl, host } from '../../../config';
import { apiUrl, host, twitterIntegration } from '../../../config';
export default Vue.extend({
props: {
@@ -36,7 +36,8 @@ export default Vue.extend({
password: '',
token: '',
apiUrl,
host
host,
twitterIntegration
};
},
methods: {

View File

@@ -104,13 +104,15 @@ export default Vue.extend({
}
fetch('/url?url=' + encodeURIComponent(this.url)).then(res => {
res.json().then(info => {
this.title = info.title;
this.description = info.description;
this.thumbnail = info.thumbnail;
this.icon = info.icon;
this.sitename = info.sitename;
if (info.url != null) {
this.title = info.title;
this.description = info.description;
this.thumbnail = info.thumbnail;
this.icon = info.icon;
this.sitename = info.sitename;
this.fetching = false;
this.fetching = false;
}
});
});
}

View File

@@ -22,6 +22,7 @@ declare const _CODENAME_: string;
declare const _LICENSE_: string;
declare const _GOOGLE_MAPS_API_KEY_: string;
declare const _WELCOME_BG_URL_: string;
declare const _TWITTER_INTEGRATION_: boolean;
export const host = _HOST_;
export const hostname = _HOSTNAME_;
@@ -47,3 +48,4 @@ export const codename = _CODENAME_;
export const license = _LICENSE_;
export const googleMapsApiKey = _GOOGLE_MAPS_API_KEY_;
export const welcomeBgUrl = _WELCOME_BG_URL_;
export const twitterIntegration = _TWITTER_INTEGRATION_;

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -3,9 +3,7 @@ import config from '../config';
const u = config.mongodb.user ? encodeURIComponent(config.mongodb.user) : null;
const p = config.mongodb.pass ? encodeURIComponent(config.mongodb.pass) : null;
const uri = u && p
? `mongodb://${u}:${p}@${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`
: `mongodb://${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`;
const uri = `mongodb://${u && p ? `${u}:${p}@` : ''}${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`;
/**
* monk

View File

@@ -8,6 +8,7 @@ export default function(reaction: string): string {
case 'congrats': return '🎉';
case 'angry': return '💢';
case 'confused': return '😥';
case 'rip': return '😇';
case 'pudding': return '🍮';
default: return '';
}

View File

@@ -10,7 +10,7 @@ import DriveFileThumbnail, { deleteDriveFileThumbnail } from './drive-file-thumb
const DriveFile = monkDb.get<IDriveFile>('driveFiles.files');
DriveFile.createIndex('md5');
DriveFile.createIndex(['metadata.uri', 'metadata.userId'], { sparse: true, unique: true });
DriveFile.createIndex('metadata.uri');
export default DriveFile;
export const DriveFileChunk = monkDb.get('driveFiles.chunks');

View File

@@ -26,6 +26,7 @@ export const validateReaction = $.str.or([
'congrats',
'angry',
'confused',
'rip',
'pudding'
]);

View File

@@ -40,6 +40,5 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
});
// Serialize
res(await Promise.all(history.map(async h =>
await pack(h.messageId, user))));
res(await Promise.all(history.map(h => pack(h.messageId, user))));
});

View File

@@ -0,0 +1,43 @@
import $ from 'cafy'; import ID from '../../../../../misc/cafy-id';
import Message from '../../../../../models/messaging-message';
import { ILocalUser } from '../../../../../models/user';
import read from '../../../common/read-messaging-message';
import getParams from '../../../get-params';
export const meta = {
desc: {
ja: '指定した自分宛てのメッセージを既読にします。',
en: 'Mark as read a message of messaging.'
},
requireCredential: true,
kind: 'messaging-write',
params: {
messageId: $.type(ID).note({
desc: {
ja: '既読にするメッセージのID',
en: 'The ID of a message that you want to mark as read'
}
})
}
};
export default (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
const [ps, psErr] = getParams(meta, params);
if (psErr) throw psErr;
const message = await Message.findOne({
_id: ps.messageId,
recipientId: user._id
});
if (message == null) {
return rej('message not found');
}
read(user._id, message.userId, message);
res();
});

View File

@@ -8,7 +8,8 @@ import getParams from '../../get-params';
export const meta = {
desc: {
ja: 'タイムラインを取得します。'
ja: 'タイムラインを取得します。',
en: 'Get timeline of myself.'
},
requireCredential: true,
@@ -67,9 +68,6 @@ export const meta = {
}
};
/**
* Get timeline of myself
*/
export default async (params: any, user: ILocalUser) => {
const [ps, psErr] = getParams(meta, params);
if (psErr) throw psErr;

View File

@@ -14,7 +14,9 @@ module.exports = async (ctx: Koa.Context) => {
ctx.body = summary;
} catch (e) {
ctx.status = 500;
ctx.status = 200;
ctx.set('Cache-Control', 'max-age=86400, immutable');
ctx.body = '{}';
}
};

View File

@@ -188,6 +188,7 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
// 通知
if (isLocalUser(data.reply._user)) {
nm.push(data.reply.userId, 'reply');
publishUserStream(data.reply.userId, 'reply', noteObj);
}
}
@@ -209,7 +210,7 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
}
// Publish event
if (!user._id.equals(data.renote.userId)) {
if (!user._id.equals(data.renote.userId) && isLocalUser(data.renote._user)) {
publishUserStream(data.renote.userId, 'renote', noteObj);
}
}

View File

@@ -95,7 +95,8 @@ const consts = {
_URL_: config.url,
_LICENSE_: licenseHtml,
_GOOGLE_MAPS_API_KEY_: config.google_maps_api_key,
_WELCOME_BG_URL_: config.welcome_bg_url
_WELCOME_BG_URL_: config.welcome_bg_url,
_TWITTER_INTEGRATION_: config.twitter != null
};
const _consts: { [ key: string ]: any } = {};