mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 04:43:09 +02:00
非正規化カラムを削除
非正規化するほどの情報じゃない
This commit is contained in:
parent
ab8c6515b8
commit
11c30eccb3
4 changed files with 12 additions and 11 deletions
|
@ -195,12 +195,6 @@ export class Note {
|
|||
})
|
||||
public userHost: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
})
|
||||
public userInbox: string | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
|
|
|
@ -329,12 +329,16 @@ async function publish(user: User, note: Note, reply: Note, renote: Note, noteAc
|
|||
if (Users.isLocalUser(user)) {
|
||||
// 投稿がリプライかつ投稿者がローカルユーザーかつリプライ先の投稿の投稿者がリモートユーザーなら配送
|
||||
if (reply && reply.userHost !== null) {
|
||||
deliver(user, noteActivity, reply.userInbox);
|
||||
Users.findOne(reply.userId).then(u => {
|
||||
deliver(user, noteActivity, u.inbox);
|
||||
});
|
||||
}
|
||||
|
||||
// 投稿がRenoteかつ投稿者がローカルユーザーかつRenote元の投稿の投稿者がリモートユーザーなら配送
|
||||
if (renote && renote.userHost !== null) {
|
||||
deliver(user, noteActivity, renote.userInbox);
|
||||
Users.findOne(renote.userId).then(u => {
|
||||
deliver(user, noteActivity, u.inbox);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -377,7 +381,6 @@ async function insertNote(user: User, data: Option, tags: string[], emojis: stri
|
|||
renoteUserId: data.renote ? data.renote.userId : null,
|
||||
renoteUserHost: data.renote ? data.renote.userHost : null,
|
||||
userHost: user.host,
|
||||
userInbox: user.inbox,
|
||||
};
|
||||
|
||||
if (data.uri != null) insert.uri = data.uri;
|
||||
|
|
|
@ -90,7 +90,9 @@ export default async (user: User, note: Note, reaction: string) => {
|
|||
// リアクターがローカルユーザーかつリアクション対象がリモートユーザーの投稿なら配送
|
||||
if (Users.isLocalUser(user) && note.userHost !== null) {
|
||||
const content = renderActivity(renderLike(user, note, reaction));
|
||||
deliver(user, content, note.userInbox);
|
||||
Users.findOne(note.userId).then(u => {
|
||||
deliver(user, content, u.inbox);
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
};
|
||||
|
|
|
@ -41,7 +41,9 @@ export default async (user: User, note: Note) => {
|
|||
// リアクターがローカルユーザーかつリアクション対象がリモートユーザーの投稿なら配送
|
||||
if (Users.isLocalUser(user) && (note.userHost !== null)) {
|
||||
const content = renderActivity(renderUndo(renderLike(user, note, exist.reaction), user));
|
||||
deliver(user, content, note.userInbox);
|
||||
Users.findOne(note.userId).then(u => {
|
||||
deliver(user, content, u.inbox);
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue