mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-25 22:22:51 +09:00
Fix bugs
This commit is contained in:
parent
b6aeacdeb9
commit
0154e44e1d
@ -12,8 +12,9 @@ export default (job, done) => {
|
|||||||
const handler = handlers[job.data.type];
|
const handler = handlers[job.data.type];
|
||||||
|
|
||||||
if (handler) {
|
if (handler) {
|
||||||
handler(job).then(() => done(), done);
|
handler(job, done);
|
||||||
} else {
|
} else {
|
||||||
console.warn(`Unknown job: ${job.data.type}`);
|
console.warn(`Unknown job: ${job.data.type}`);
|
||||||
|
done();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -98,7 +98,7 @@ export default async (user: IUser, content: {
|
|||||||
const postObj = await pack(post);
|
const postObj = await pack(post);
|
||||||
|
|
||||||
// タイムラインへの投稿
|
// タイムラインへの投稿
|
||||||
if (!post.channelId) {
|
if (post.channelId == null) {
|
||||||
// Publish event to myself's stream
|
// Publish event to myself's stream
|
||||||
if (isLocalUser(user)) {
|
if (isLocalUser(user)) {
|
||||||
stream(post.userId, 'post', postObj);
|
stream(post.userId, 'post', postObj);
|
||||||
@ -110,7 +110,7 @@ export default async (user: IUser, content: {
|
|||||||
from: 'users',
|
from: 'users',
|
||||||
localField: 'followerId',
|
localField: 'followerId',
|
||||||
foreignField: '_id',
|
foreignField: '_id',
|
||||||
as: 'follower'
|
as: 'user'
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
$match: {
|
$match: {
|
||||||
@ -125,7 +125,9 @@ export default async (user: IUser, content: {
|
|||||||
const content = renderCreate(note);
|
const content = renderCreate(note);
|
||||||
content['@context'] = context;
|
content['@context'] = context;
|
||||||
|
|
||||||
Promise.all(followers.map(({ follower }) => {
|
Promise.all(followers.map(follower => {
|
||||||
|
follower = follower.user[0];
|
||||||
|
|
||||||
if (isLocalUser(follower)) {
|
if (isLocalUser(follower)) {
|
||||||
// Publish event to followers stream
|
// Publish event to followers stream
|
||||||
stream(follower._id, 'post', postObj);
|
stream(follower._id, 'post', postObj);
|
||||||
|
Loading…
Reference in New Issue
Block a user