Compare commits

..

9 Commits

Author SHA1 Message Date
syuilo
58d0ed1a2e 5.23.2 2018-08-14 02:36:06 +09:00
syuilo
8939452036 Merge pull request #2192 from acid-chicken/acid-chicken-patch-3
Re: Re: Fix #2177
2018-08-14 02:31:00 +09:00
Acid Chicken (硫酸鶏)
a2931d6f7e Update ui.header.vue 2018-08-14 02:26:58 +09:00
syuilo
dc4f585954 Merge pull request #2191 from syuilo/greenkeeper/parse5-5.1.0
Update parse5 to the latest version 🚀
2018-08-14 01:58:01 +09:00
syuilo
1fbe5365f7 Update example.yml 2018-08-14 01:57:52 +09:00
greenkeeper[bot]
04257db938 fix(package): update parse5 to version 5.1.0 2018-08-13 16:54:58 +00:00
syuilo
c29cb5bfb9 Update package.json 2018-08-14 01:38:29 +09:00
syuilo
131a454e7c Merge pull request #2190 from mei23/mei-apsendvis2
ActivityPub送信時の公開範囲の実装
2018-08-14 01:36:56 +09:00
mei23
f079041827 ActivityPub visibility on send 2018-08-13 03:49:17 +09:00
6 changed files with 70 additions and 12 deletions

View File

@@ -64,7 +64,7 @@ drive:
# config:
# endPoint:
# port:
# secure:
# useSSL:
# accessKey:
# secretKey:
@@ -75,7 +75,7 @@ drive:
# config:
# endPoint: s3-us-west-2.amazonaws.com
# region: us-west-2
# secure: true
# useSSL: true
# accessKey: XXX
# secretKey: YYY
@@ -87,7 +87,7 @@ drive:
# config:
# endPoint: s3-us-west-2.amazonaws.com
# region: us-west-2
# secure: true
# useSSL: true
# accessKey: XXX
# secretKey: YYY

View File

@@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "5.23.0",
"clientVersion": "1.0.8226",
"version": "5.23.2",
"clientVersion": "1.0.8235",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,
@@ -161,7 +161,7 @@
"object-assign-deep": "0.4.0",
"on-build-webpack": "0.1.0",
"os-utils": "0.0.14",
"parse5": "5.0.0",
"parse5": "5.1.0",
"portscanner": "2.2.0",
"progress-bar-webpack-plugin": "1.11.0",
"promise-sequential": "1.1.1",

View File

@@ -159,6 +159,9 @@ root(isDark)
position absolute
height 48px
> .center
right 0
> .icon
margin auto
display block
@@ -175,8 +178,7 @@ root(isDark)
> .center
left 0
> .right,
> .center
> .right
right 0
> *

View File

@@ -50,9 +50,21 @@ export default async function renderNote(note: INote, dive = true): Promise<any>
? note.mentionedRemoteUsers.map(x => x.uri)
: [];
const cc = ['public', 'home', 'followers'].includes(note.visibility)
? [`${attributedTo}/followers`].concat(mentions)
: [];
let to: string[] = [];
let cc: string[] = [];
if (note.visibility == 'public') {
to = ['https://www.w3.org/ns/activitystreams#Public'];
cc = [`${attributedTo}/followers`].concat(mentions);
} else if (note.visibility == 'home') {
to = [`${attributedTo}/followers`];
cc = ['https://www.w3.org/ns/activitystreams#Public'].concat(mentions);
} else if (note.visibility == 'followers') {
to = [`${attributedTo}/followers`];
cc = mentions;
} else {
to = mentions;
}
const mentionedUsers = note.mentions ? await User.find({
_id: {
@@ -74,7 +86,7 @@ export default async function renderNote(note: INote, dive = true): Promise<any>
summary: note.cw,
content: toHtml(note),
published: note.createdAt.toISOString(),
to: 'https://www.w3.org/ns/activitystreams#Public',
to,
cc,
inReplyTo,
attachment: (await promisedFiles).map(renderDocument),

View File

@@ -19,6 +19,8 @@ export default async (user: ILocalUser) => {
id,
inbox: `${id}/inbox`,
outbox: `${id}/outbox`,
followers: `${id}/followers`,
following: `${id}/following`,
sharedInbox: `${config.url}/inbox`,
url: `${config.url}/@${user.username}`,
preferredUsername: user.username,

View File

@@ -89,6 +89,48 @@ router.get('/users/:user/outbox', async ctx => {
ctx.body = pack(rendered);
});
// followers
router.get('/users/:user/followers', async ctx => {
const userId = new mongo.ObjectID(ctx.params.user);
const user = await User.findOne({
_id: userId,
host: null
});
if (user === null) {
ctx.status = 404;
return;
}
// TODO: Implement fetch and render
const rendered = renderOrderedCollection(`${config.url}/users/${userId}/followers`, 0, []);
ctx.body = pack(rendered);
});
// following
router.get('/users/:user/following', async ctx => {
const userId = new mongo.ObjectID(ctx.params.user);
const user = await User.findOne({
_id: userId,
host: null
});
if (user === null) {
ctx.status = 404;
return;
}
// TODO: Implement fetch and render
const rendered = renderOrderedCollection(`${config.url}/users/${userId}/following`, 0, []);
ctx.body = pack(rendered);
});
// publickey
router.get('/users/:user/publickey', async ctx => {
const userId = new mongo.ObjectID(ctx.params.user);