server: use host parameter in note search without elasticsearch

Changelog: Fixed
This commit is contained in:
Johann150 2022-11-19 17:33:27 +01:00
parent 4183c429e6
commit 7ffe2181a9
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -50,6 +50,8 @@ export default define(meta, paramDef, async (ps, me) => {
if (ps.userId) { if (ps.userId) {
query.andWhere('note.userId = :userId', { userId: ps.userId }); query.andWhere('note.userId = :userId', { userId: ps.userId });
} else if (ps.host) {
query.andWhere('note.userHost = :host', { host: ps.host });
} else if (ps.channelId) { } else if (ps.channelId) {
query.andWhere('note.channelId = :channelId', { channelId: ps.channelId }); query.andWhere('note.channelId = :channelId', { channelId: ps.channelId });
} }