1.1.3
This commit is contained in:
@@ -3,6 +3,7 @@ import { paginationOptsValidator } from "convex/server";
|
||||
import { v } from "convex/values";
|
||||
import { getPublicStorageUrl } from "./storageUrl";
|
||||
import { getRolesForUser } from "./roles";
|
||||
import { isBanned } from "./bans";
|
||||
|
||||
const DEFAULT_ROLE_COLOR = "#99aab5";
|
||||
|
||||
@@ -252,6 +253,9 @@ export const sendInternal = internalMutation({
|
||||
if (args.ciphertext.length > MAX_CIPHERTEXT_CHARS) {
|
||||
throw new Error("Message too large");
|
||||
}
|
||||
if (await isBanned(ctx, args.senderId)) {
|
||||
throw new Error("You've been banned from this server.");
|
||||
}
|
||||
const id = await ctx.db.insert("messages", {
|
||||
channelId: args.channelId,
|
||||
senderId: args.senderId,
|
||||
|
||||
Reference in New Issue
Block a user