mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 13:14:06 +01:00
[Fix] All messages should have edited_timestamp even if null
This commit is contained in:
parent
7dab8f9435
commit
a95d7b7ce5
@ -126,7 +126,7 @@ router.post("/", messageUpload.single("file"), async (req: Request, res: Respons
|
|||||||
|
|
||||||
const embeds = [];
|
const embeds = [];
|
||||||
if (body.embed) embeds.push(body.embed);
|
if (body.embed) embeds.push(body.embed);
|
||||||
const data = await sendMessage({ ...body, type: 0, pinned: false, author_id: req.user_id, embeds, channel_id, attachments });
|
const data = await sendMessage({ ...body, type: 0, pinned: false, author_id: req.user_id, embeds, channel_id, attachments, edited_timestamp: null });
|
||||||
|
|
||||||
return res.send(data);
|
return res.send(data);
|
||||||
});
|
});
|
||||||
|
@ -5,8 +5,7 @@ const router = Router();
|
|||||||
|
|
||||||
router.get("/", (req: Request, res: Response) => {
|
router.get("/", (req: Request, res: Response) => {
|
||||||
const { endpoint } = Config.get().gateway;
|
const { endpoint } = Config.get().gateway;
|
||||||
res.setHeader('Content-Type', 'application/json');
|
res.json({ url: endpoint || process.env.GATEWAY || "ws://localhost:3002" });
|
||||||
res.send(JSON.stringify({ url: endpoint || process.env.GATEWAY || "ws://localhost:3002" }));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
@ -5,6 +5,7 @@ import "missing-native-js-functions";
|
|||||||
import { config } from "dotenv";
|
import { config } from "dotenv";
|
||||||
config();
|
config();
|
||||||
import { FosscordServer } from "./Server";
|
import { FosscordServer } from "./Server";
|
||||||
|
console.log(process.env.MONGO_URL)
|
||||||
import cluster from "cluster";
|
import cluster from "cluster";
|
||||||
import os from "os";
|
import os from "os";
|
||||||
const cores = Number(process.env.threads) || os.cpus().length;
|
const cores = Number(process.env.threads) || os.cpus().length;
|
||||||
|
Loading…
Reference in New Issue
Block a user