feat: Add a large collection of emoji and other frontend assets, including a sound file, and a backend package.json.

This commit is contained in:
Bryan1029384756
2026-01-06 17:58:56 -06:00
parent f531301863
commit abedd78893
3795 changed files with 10981 additions and 229 deletions

View File

@@ -8,22 +8,32 @@ CREATE TABLE IF NOT EXISTS users (
hashed_auth_key TEXT NOT NULL,
public_identity_key TEXT NOT NULL,
public_signing_key TEXT NOT NULL,
encrypted_private_keys TEXT NOT NULL, -- Added this column
encrypted_private_keys TEXT NOT NULL,
is_admin BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT NOW()
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE IF NOT EXISTS channels (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT UNIQUE NOT NULL,
type TEXT DEFAULT 'text',
created_at TIMESTAMP DEFAULT NOW()
type TEXT DEFAULT 'text' CHECK (type IN ('text', 'voice')),
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE IF NOT EXISTS roles (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
permissions JSONB
color TEXT DEFAULT '#99aab5',
position INTEGER DEFAULT 0,
permissions JSONB DEFAULT '{}',
is_hoist BOOLEAN DEFAULT FALSE,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE IF NOT EXISTS user_roles (
user_id UUID REFERENCES users(id) ON DELETE CASCADE,
role_id INTEGER REFERENCES roles(id) ON DELETE CASCADE,
PRIMARY KEY (user_id, role_id)
);
CREATE TABLE IF NOT EXISTS channel_keys (
@@ -42,5 +52,16 @@ CREATE TABLE IF NOT EXISTS messages (
nonce TEXT NOT NULL,
signature TEXT NOT NULL,
key_version INTEGER NOT NULL,
created_at TIMESTAMP DEFAULT NOW()
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE IF NOT EXISTS invites (
code TEXT PRIMARY KEY, -- e.g. "8f1a4c..." (The ID of the invite)
encrypted_payload TEXT NOT NULL, -- The AES-Encrypted Key Bundle (Server can't read this)
created_by UUID REFERENCES users(id) ON DELETE CASCADE,
max_uses INTEGER DEFAULT NULL, -- NULL = Infinite
uses INTEGER DEFAULT 0,
expires_at TIMESTAMPTZ DEFAULT NULL, -- NULL = Never
key_version INTEGER NOT NULL, -- Which key version is inside? (So we can invalidate leaks)
created_at TIMESTAMPTZ DEFAULT NOW()
);