chore(rebase): realign duplicate backend/channel/schema files with main

This commit is contained in:
William Valentin
2026-02-17 15:44:47 -08:00
parent 03fa96583c
commit b0d06d0650
9 changed files with 0 additions and 691 deletions
-13
View File
@@ -169,19 +169,6 @@ export class LineAdapter implements ChannelAdapter {
} finally {
await rm(tempDir, { recursive: true, force: true });
}
if (message.attachments && message.attachments.length > 0) {
for (const attachment of message.attachments) {
if (attachment.url) {
const line = attachment.filename ? `${attachment.filename}: ${attachment.url}` : attachment.url;
await this.sendPush(peerId, line);
continue;
}
if (attachment.data) {
console.warn(`LINE: skipping attachment data (${attachment.mimeType}) — upload not implemented`);
}
}
}
}
async handleRequest(req: IncomingMessage, res: ServerResponse): Promise<void> {
-24
View File
@@ -388,27 +388,3 @@ function sanitizeFilename(filename?: string): string {
function escapeRegex(value: string): string {
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
function sanitizeFilename(name?: string): string {
if (!name) {
return '';
}
return name.replace(/[^a-zA-Z0-9._-]/g, '_').slice(0, 100);
}
function extensionFromMimeType(mimeType?: string): string {
if (!mimeType) {
return '';
}
const simple = mimeType.split('/')[1]?.trim().toLowerCase();
if (!simple) {
return '';
}
if (simple.includes('jpeg')) {
return '.jpg';
}
if (simple.includes('plain')) {
return '.txt';
}
return `.${simple.replace(/[^a-z0-9]/g, '')}`;
}
-13
View File
@@ -159,19 +159,6 @@ export class ZaloAdapter implements ChannelAdapter {
} finally {
await rm(tempDir, { recursive: true, force: true });
}
if (message.attachments && message.attachments.length > 0) {
for (const attachment of message.attachments) {
if (attachment.url) {
const line = attachment.filename ? `${attachment.filename}: ${attachment.url}` : attachment.url;
await this.sendText(peerId, line);
continue;
}
if (attachment.data) {
console.warn(`Zalo: skipping attachment data (${attachment.mimeType}) — upload not implemented`);
}
}
}
}
async handleRequest(req: IncomingMessage, res: ServerResponse): Promise<void> {