sharedInbox対応
This commit is contained in:
parent
297a7f541e
commit
900a9cb34f
6 changed files with 25 additions and 8 deletions
|
@ -403,7 +403,9 @@ async function publishToFollowers(note: INote, noteObj: any, user: IUser, noteAc
|
|||
followeeId: note.userId
|
||||
});
|
||||
|
||||
followers.map(async (following) => {
|
||||
const queue: string[] = [];
|
||||
|
||||
followers.map(following => {
|
||||
const follower = following._follower;
|
||||
|
||||
if (isLocalUser(follower)) {
|
||||
|
@ -423,10 +425,15 @@ async function publishToFollowers(note: INote, noteObj: any, user: IUser, noteAc
|
|||
} else {
|
||||
// フォロワーがリモートユーザーかつ投稿者がローカルユーザーなら投稿を配信
|
||||
if (isLocalUser(user)) {
|
||||
deliver(user, noteActivity, follower.inbox);
|
||||
const inbox = follower.sharedInbox || follower.inbox;
|
||||
if (!queue.includes(inbox)) queue.push(inbox);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
queue.forEach(inbox => {
|
||||
deliver(user, noteActivity, inbox);
|
||||
});
|
||||
}
|
||||
|
||||
function deliverNoteToMentionedRemoteUsers(mentionedUsers: IUser[], user: ILocalUser, noteActivity: any) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue