removed temp message

This commit is contained in:
slawk0
2024-12-07 19:29:22 +01:00
parent e2e34f9776
commit 15a3215a7e
5 changed files with 31 additions and 63 deletions

View File

@@ -81,7 +81,6 @@ function initializeSocket(io) {
if (!message && !attachment_urls) {
callback({
status: "error",
tempId: msg.tempId,
message: "No message or attachment provided",
});
return;
@@ -89,7 +88,6 @@ function initializeSocket(io) {
if (!recipient) {
callback({
status: "error",
tempId: msg.tempId,
message: "No recipient provided",
});
return;
@@ -104,7 +102,6 @@ function initializeSocket(io) {
);
if (!insertedMessage) {
callback({
tempId: msg.tempId,
status: "error",
message: "Failed to insert message",
});
@@ -136,14 +133,13 @@ function initializeSocket(io) {
});
callback({
message_id,
status: "ok",
tempId: msg.tempId,
message: "Received message",
});
} catch (e) {
console.error("(socket) Failed to insert message ", e);
callback({
tempId: msg.tempId,
status: "error",
message: "Internal server error",
});