From b5ed8a0ad341b99d3666ac9e5fe1309d4e6b40d1 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 5 Jul 2023 19:18:21 +0200 Subject: [PATCH] Remove some debug logging --- megalodon/src/misskey.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/megalodon/src/misskey.ts b/megalodon/src/misskey.ts index adb2b38..0624c53 100644 --- a/megalodon/src/misskey.ts +++ b/megalodon/src/misskey.ts @@ -992,7 +992,6 @@ export default class Misskey implements MegalodonInterface { } public async getAccountFeaturedTags(): Promise>> { - console.log("getting featured tags"); const tags : Entity.FeaturedTag[] = []; const res : Response = { headers: undefined, @@ -1207,13 +1206,10 @@ export default class Misskey implements MegalodonInterface { } public async getMentions(text: string, cache: AccountCache): Promise { - console.log(`cache length: ${cache.accounts.length}`); const mentions :Entity.Mention[] = []; const mentionMatch = text.matchAll(/(?<=^|\s)@(?.*?)(?:@(?.*?)|)(?=\s|$)/g); for (const m of mentionMatch) { - console.log(`regex match:`); - console.log(JSON.stringify(m, null, 2)); if (m.groups == null) continue; @@ -1241,17 +1237,12 @@ export default class Misskey implements MegalodonInterface { const account = cacheHit ?? (await this.getAccountByName(user, host ?? null)).data; if (!account) { - console.log(`cache fail: ${acctToFind}`); return null; } if (cacheHit == null) { - console.log(`cache miss: ${acctToFind}`); cache.accounts.push(account); } - else { - console.log(`cache hit: ${acctToFind}`); - } return account; }) @@ -1323,8 +1314,6 @@ export default class Misskey implements MegalodonInterface { }) } return this.client.post>('/api/notes/children', params).then(async res => { - console.log(JSON.stringify(res, null, 2)); - const accountCache = this.getFreshAccountCache(); const conversation = await this.client.post>('/api/notes/conversation', params); const parents = await Promise.all(conversation.data.map(n => this.noteWithMentions(n, this.baseUrlToHost(this.baseUrl), accountCache)));