Fix forgotten function signature changes

This commit is contained in:
Rory& 2025-07-06 11:02:18 +02:00
parent 2e196573ea
commit 9e4a769d69
3 changed files with 10 additions and 5 deletions

View File

@ -30,7 +30,7 @@ import {
emitEvent,
getPermission,
getRights,
uploadFile
uploadFile, NewUrlUserSignatureData,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
@ -245,7 +245,10 @@ router.put(
console.error("[Message] post-message handler failed", e),
);
return res.json(message.withSignedAttachments(req));
return res.json(message.withSignedAttachments(new NewUrlUserSignatureData({
ip: req.ip,
userAgent: req.headers["user-agent"] as string,
})));
},
);

View File

@ -36,7 +36,7 @@ import {
getPermission,
isTextChannel,
getUrlSignature,
uploadFile, NewUrlSignatureData,
uploadFile, NewUrlSignatureData, NewUrlUserSignatureData,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
@ -439,7 +439,10 @@ router.post(
console.error("[Message] post-message handler failed", e),
);
return res.json(message.withSignedAttachments(req));
return res.json(message.withSignedAttachments(new NewUrlUserSignatureData({
ip: req.ip,
userAgent: req.headers["user-agent"] as string,
})));
},
);

View File

@ -20,7 +20,6 @@ import { Intents, ListenEventOpts, Permissions } from "@spacebar/util";
import WS from "ws";
import { Deflate, Inflate } from "fast-zlib";
import { Capabilities } from "./Capabilities";
import { Request } from "express";
export interface WebSocket extends WS {
version: number;