Fix creating webhooks for matrix users

This commit is contained in:
Cadence Ember
2026-08-19 22:21:46 +12:00
parent 0d398be60a
commit 2e84c71d96
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -129,6 +129,8 @@ function onMessageDelete(messageID) {
* @param {string} roomID
*/
async function getWebhookSenderId(message, guildID, roomID) {
const isMatrixWebhook = select("webhook", "webhook_id", {webhook_id: message.webhook_id}).pluck().get()
if (isMatrixWebhook) return null
const speedbumpUserID = select("channel_speedbump", "speedbump_user_id", {channel_id: message.channel_id, speedbump_webhook_id: message.webhook_id}).pluck().get()
const useWebhookProfile = select("guild_space", "webhook_profile", {guild_id: guildID}).pluck().get() ?? 0
if (speedbumpUserID === "466378653216014359") { // PluralKit public instance
+1 -1
View File
@@ -1612,7 +1612,7 @@ test("message2event: expired/invalid invites are sent as-is", async t => {
snow: {
invite: {
async getInvite() {
throw new Error(`{"message": "Unknown Invite", "code": 10006}`)
throw new Error(`Unknown Invite`)
}
}
}