added files in git

This commit is contained in:
SlimusMinus
2026-07-03 00:04:56 +03:00
parent a5d457b07a
commit b924bc5f94
33 changed files with 2916 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
const postByChatId = new Map();
export function setPostForChat(chatId, post) {
postByChatId.set(chatId, post);
}
export function getPostForChat(chatId) {
return postByChatId.get(chatId);
}
export function cachePostsFromChats(chats) {
for (const chat of chats) {
if (chat.post) {
postByChatId.set(chat.id, chat.post);
}
}
}