From 35b06b4fc851192916e000ad5e7e2f458846448c Mon Sep 17 00:00:00 2001 From: kartofen Date: Sun, 28 Aug 2022 00:08:07 +0300 Subject: working on thread uploading --- src/lib/thread.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/thread.ts b/src/lib/thread.ts index d0a4fce..6bc54ce 100644 --- a/src/lib/thread.ts +++ b/src/lib/thread.ts @@ -2,7 +2,7 @@ import { writeFileSync, existsSync } from 'fs'; import { getImg } from './image'; import type Thread from '../models/Thread' -export async function processThreadIn(board: string, thread: Thread, procComments?: false) { +export async function processThreadIn(board: string, thread: Thread, comments? =false) { if(!thread || !board) return; let imageId: string = thread.imageId; @@ -13,7 +13,7 @@ export async function processThreadIn(board: string, thread: Thread, procComment thread.threadText = replaceURLs(thread.threadText, board, thread.id); - if(!procComments) return; + if(!comments) return; for(let comment of thread.comments) { @@ -27,6 +27,10 @@ export async function processThreadIn(board: string, thread: Thread, procComment } } +export async function processThreadOUT(board: string, thread: Thread, comments? = false) { + +} + function replaceURLs(text: string, board: string, OPtid?: string): string { if(!text) return; -- cgit v1.2.3