* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update CHANGELOG.md

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update CHANGELOG.md

* Update CHANGELOG.md

* wip

* Update CHANGELOG.md

* wip

* wip

* wip

* wip
This commit is contained in:
syuilo 2018-10-07 11:06:17 +09:00 committed by GitHub
parent 0b98a2364b
commit d0570d7fe3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
126 changed files with 1812 additions and 2273 deletions

View file

@ -2,7 +2,7 @@ import User, { isLocalUser, isRemoteUser, pack as packUser, IUser } from '../../
import Following from '../../models/following';
import FollowingLog from '../../models/following-log';
import FollowedLog from '../../models/followed-log';
import { publishUserStream } from '../../stream';
import { publishMainStream } from '../../stream';
import notify from '../../notify';
import pack from '../../remote/activitypub/renderer';
import renderFollow from '../../remote/activitypub/renderer/follow';
@ -61,12 +61,12 @@ export default async function(follower: IUser, followee: IUser) {
// Publish follow event
if (isLocalUser(follower)) {
packUser(followee, follower).then(packed => publishUserStream(follower._id, 'follow', packed));
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'follow', packed));
}
// Publish followed event
if (isLocalUser(followee)) {
packUser(follower, followee).then(packed => publishUserStream(followee._id, 'followed', packed)),
packUser(follower, followee).then(packed => publishMainStream(followee._id, 'followed', packed)),
// 通知を作成
notify(followee._id, follower._id, 'follow');

View file

@ -2,7 +2,7 @@ import User, { isLocalUser, isRemoteUser, pack as packUser, IUser } from '../../
import Following from '../../models/following';
import FollowingLog from '../../models/following-log';
import FollowedLog from '../../models/followed-log';
import { publishUserStream } from '../../stream';
import { publishMainStream } from '../../stream';
import pack from '../../remote/activitypub/renderer';
import renderFollow from '../../remote/activitypub/renderer/follow';
import renderUndo from '../../remote/activitypub/renderer/undo';
@ -52,7 +52,7 @@ export default async function(follower: IUser, followee: IUser) {
// Publish unfollow event
if (isLocalUser(follower)) {
packUser(followee, follower).then(packed => publishUserStream(follower._id, 'unfollow', packed));
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'unfollow', packed));
}
if (isLocalUser(follower) && isRemoteUser(followee)) {

View file

@ -7,7 +7,7 @@ import { deliver } from '../../../queue';
import Following from '../../../models/following';
import FollowingLog from '../../../models/following-log';
import FollowedLog from '../../../models/followed-log';
import { publishUserStream } from '../../../stream';
import { publishMainStream } from '../../../stream';
export default async function(followee: IUser, follower: IUser) {
const following = await Following.insert({
@ -74,7 +74,7 @@ export default async function(followee: IUser, follower: IUser) {
packUser(followee, followee, {
detail: true
}).then(packed => publishUserStream(followee._id, 'meUpdated', packed));
}).then(packed => publishMainStream(followee._id, 'meUpdated', packed));
packUser(followee, follower).then(packed => publishUserStream(follower._id, 'follow', packed));
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'follow', packed));
}

View file

@ -4,7 +4,7 @@ import pack from '../../../remote/activitypub/renderer';
import renderFollow from '../../../remote/activitypub/renderer/follow';
import renderUndo from '../../../remote/activitypub/renderer/undo';
import { deliver } from '../../../queue';
import { publishUserStream } from '../../../stream';
import { publishMainStream } from '../../../stream';
export default async function(followee: IUser, follower: IUser) {
if (isRemoteUser(followee)) {
@ -34,5 +34,5 @@ export default async function(followee: IUser, follower: IUser) {
packUser(followee, followee, {
detail: true
}).then(packed => publishUserStream(followee._id, 'meUpdated', packed));
}).then(packed => publishMainStream(followee._id, 'meUpdated', packed));
}

View file

@ -1,5 +1,5 @@
import User, { isLocalUser, isRemoteUser, pack as packUser, IUser } from '../../../models/user';
import { publishUserStream } from '../../../stream';
import { publishMainStream } from '../../../stream';
import notify from '../../../notify';
import pack from '../../../remote/activitypub/renderer';
import renderFollow from '../../../remote/activitypub/renderer/follow';
@ -33,11 +33,11 @@ export default async function(follower: IUser, followee: IUser) {
// Publish receiveRequest event
if (isLocalUser(followee)) {
packUser(follower, followee).then(packed => publishUserStream(followee._id, 'receiveFollowRequest', packed));
packUser(follower, followee).then(packed => publishMainStream(followee._id, 'receiveFollowRequest', packed));
packUser(followee, followee, {
detail: true
}).then(packed => publishUserStream(followee._id, 'meUpdated', packed));
}).then(packed => publishMainStream(followee._id, 'meUpdated', packed));
// 通知を作成
notify(followee._id, follower._id, 'receiveFollowRequest');

View file

@ -4,7 +4,7 @@ import pack from '../../../remote/activitypub/renderer';
import renderFollow from '../../../remote/activitypub/renderer/follow';
import renderReject from '../../../remote/activitypub/renderer/reject';
import { deliver } from '../../../queue';
import { publishUserStream } from '../../../stream';
import { publishMainStream } from '../../../stream';
export default async function(followee: IUser, follower: IUser) {
if (isRemoteUser(follower)) {
@ -23,5 +23,5 @@ export default async function(followee: IUser, follower: IUser) {
}
});
packUser(followee, follower).then(packed => publishUserStream(follower._id, 'unfollow', packed));
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'unfollow', packed));
}