aboutsummaryrefslogtreecommitdiff
path: root/src/lib/thread.ts
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2022-08-28 00:08:07 +0300
committerkartofen <mladenovnasko0@gmail.com>2022-08-28 00:08:07 +0300
commit35b06b4fc851192916e000ad5e7e2f458846448c (patch)
treef9a1536aae76a5058d26f8b82ddcf63e83f500cc /src/lib/thread.ts
parent8f5278eb443864910dd9c2131c992d71e3af2d20 (diff)
working on thread uploading
Diffstat (limited to 'src/lib/thread.ts')
-rw-r--r--src/lib/thread.ts8
1 files changed, 6 insertions, 2 deletions
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;