V10 (#2826)
* 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:
parent
0b98a2364b
commit
d0570d7fe3
126 changed files with 1812 additions and 2273 deletions
|
@ -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');
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue