Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kozakura913 committed Sep 19, 2024
1 parent 337d846 commit f8b024b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/backend/src/misc/remote-api-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,16 @@ export async function emojis(
redisForRemoteApis: Redis.Redis,
host: string,
text:string,
):Promise<Map<string, string>> {
):Promise<{[k: string]: string}> {
const emojis = new Map<string, string>();
const remote_emojis = await fetch_remote_emojis(config, httpRequestService, redisForRemoteApis, host);
for (const [key, value] of remote_emojis) {
const name = ':' + key + ':';
if (text.indexOf(name) !== -1) {
console.log(key);
emojis.set(key, value);
}
}
return emojis;
return Object.fromEntries(emojis);
}

export async function fetch_remote_emojis(
Expand Down

0 comments on commit f8b024b

Please sign in to comment.