This commit is contained in:
syuilo
2018-07-30 07:20:27 +09:00
parent 4e6dcd16ac
commit 83d9730d93
33 changed files with 189 additions and 242 deletions

View File

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