Remove some debug logging
This commit is contained in:
parent
9462e8b20d
commit
b5ed8a0ad3
|
@ -992,7 +992,6 @@ export default class Misskey implements MegalodonInterface {
|
|||
}
|
||||
|
||||
public async getAccountFeaturedTags(): Promise<Response<Array<Entity.FeaturedTag>>> {
|
||||
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<Entity.Mention[]> {
|
||||
console.log(`cache length: ${cache.accounts.length}`);
|
||||
const mentions :Entity.Mention[] = [];
|
||||
const mentionMatch = text.matchAll(/(?<=^|\s)@(?<user>.*?)(?:@(?<host>.*?)|)(?=\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<Array<MisskeyAPI.Entity.Note>>('/api/notes/children', params).then(async res => {
|
||||
console.log(JSON.stringify(res, null, 2));
|
||||
|
||||
const accountCache = this.getFreshAccountCache();
|
||||
const conversation = await this.client.post<Array<MisskeyAPI.Entity.Note>>('/api/notes/conversation', params);
|
||||
const parents = await Promise.all(conversation.data.map(n => this.noteWithMentions(n, this.baseUrlToHost(this.baseUrl), accountCache)));
|
||||
|
|
Loading…
Reference in a new issue