it ain't async

This commit is contained in:
MathMan05 authored and Rory& committed 2026-03-18 05:07:08 +01:00
1 parent 7332606470
commit c4867a247e
3 files changed
+8 -10

No files matched your search

@@ -506,7 +506,7 @@ router.post(
ip: req.ip,
userAgent: req.headers["user-agent"] as string,
});
return res.json(await Message.prototype.withSignedComponents.call(message.withSignedAttachments(sign), sign));
return res.json(Message.prototype.withSignedComponents.call(message.withSignedAttachments(sign), sign));
},
);
+6 -8
View File
@@ -353,14 +353,12 @@ async function consume(this: WebSocket, opts: EventOpts) {
}),
).attachments;
if (data["components"]) {
data["components"] = (
await Message.prototype.withSignedComponents.call(
data,
new NewUrlUserSignatureData({
ip: this.ipAddress,
userAgent: this.userAgent,
}),
)
data["components"] = Message.prototype.withSignedComponents.call(
data,
new NewUrlUserSignatureData({
ip: this.ipAddress,
userAgent: this.userAgent,
}),
).components;
}
break;
+1 -1
View File
@@ -315,7 +315,7 @@ export class Message extends BaseClass {
attachments: this.attachments?.map((attachment: Attachment) => Attachment.prototype.signUrls.call(attachment, data)),
};
}
async withSignedComponents(data: NewUrlUserSignatureData) {
withSignedComponents(data: NewUrlUserSignatureData) {
if (!this.components || !(this.flags & Number(MessageFlags.FLAGS.IS_COMPONENTS_V2))) return { ...this };
function signMedia(media: UnfurledMediaItem) {
Object.assign(media, Attachment.prototype.signUrls.call(media, data));