mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-28 06:48:12 +09:00
[mastodon-client] Log note lookup failures with logger instead of console
This commit is contained in:
parent
1fdea9866a
commit
695528bed7
@ -21,7 +21,7 @@ import { resolveUser } from "@/remote/resolve-user.js";
|
||||
import { createNote } from "@/remote/activitypub/models/note.js";
|
||||
import { getUser } from "@/server/api/common/getters.js";
|
||||
import config from "@/config/index.js";
|
||||
import { MastoContext } from "@/server/api/mastodon/index.js";
|
||||
import { logger, MastoContext } from "@/server/api/mastodon/index.js";
|
||||
|
||||
export class SearchHelpers {
|
||||
public static async search(q: string | undefined, type: string | undefined, resolve: boolean = false, following: boolean = false, accountId: string | undefined, excludeUnreviewed: boolean = false, maxId: string | undefined, minId: string | undefined, limit: number = 20, offset: number | undefined, ctx: MastoContext): Promise<MastodonEntity.Search> {
|
||||
@ -139,7 +139,7 @@ export class SearchHelpers {
|
||||
return isPost(object) ? createNote(getApId(object), resolver.reset(), true).then(p => p ? [p] : []) : [];
|
||||
}
|
||||
} catch (e: any) {
|
||||
console.log(`[mastodon-client] resolve note '${q}' failed: ${e.message}`);
|
||||
logger.warn(`Resolving note '${q}' failed: ${e.message}`);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user