removed temp message
This commit is contained in:
@@ -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",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user