Merged
Conversation
Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici). Updates `undici` from 7.16.0 to 7.18.2 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.16.0...v7.18.2) --- updated-dependencies: - dependency-name: undici dependency-version: 7.18.2 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
Merges upstream changes including: - Thread support (ThreadMember, ThreadMetadata entities) - Forum tags and channel types - User/member profile customisation - Auto-moderation improvements - JSON serializer utilities - StopForumSpam integration - Various API route improvements - PostgreSQL migration scripts Conflict resolution: merged fork features (tickets, permissions) with upstream additions (threads, tags) in all 12 conflicted files. Also fixes husky pre-commit hook deprecation warnings. Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
- Remove ThreadCreateSchema, ChannelPromoteSchema, LobbyCreateSchema exports from schemas/uncategorised/index.ts (files don't exist) - Remove Array, Sentry, ConnectionPrivacy exports from util/util/index.ts (files don't exist) - Remove missing-native-js-functions import from Permissions.ts (package removed by upstream) Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
Author
Original prompt from Erkin |
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Restore fork ChannelType values (ENCRYPTED, ENCRYPTED_THREAD, TRANSACTIONAL, TICKET_TRACKER, KANBAN, VOICELESS_WHITEBOARD, CUSTOM_START) and MessageType values (ENCRYPTED, ROUTE_ADDED, ROUTE_DISABLED, SELF_COMMAND_SCRIPT, ENCRYPTION, CUSTOM_START) that were silently overwritten during upstream auto-merge. Values that conflicted with upstream's new assignments are renumbered to avoid clashes while preserving non-conflicting ones at their original numbers. Also fix AllowedMentions.parse to use string[] for plugin extensibility. Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
Give more room for upstream to grow (currently up to 63). Fork custom types now start at CUSTOM_START=127. Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
This comment was marked as off-topic.
This comment was marked as off-topic.
These were present on the default branch but lost during the upstream merge because git auto-merged the schemas file (only upstream changed it from the merge base). Without these cases, encrypted channels throw 'unimplemented' instead of being treated as text channels. Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
- Fix MessageType imports: use @spacebar/util instead of @spacebar/schemas across greet.ts, threads.ts, callback.ts to resolve enum type conflicts - Fix Message.create() typing: add explicit type assertions - Fix ChannelUpdateEvent/ChannelDeleteEvent casting - Fix getPermission call: pass channel.id instead of channel object - Fix Message handler: interaction_metadata type, PublicUser mentions - Fix AutoUpdate.ts: use arrayBuffer() instead of missing bytes() - Fix Message entity: add pinned_at, interaction_metadata, message_snapshots - Fix Permissions.ts: correct getPermission signature and user type - Fix Embed type conflicts between entity and schema packages - Fix Message | null vs undefined type mismatch Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
- Add missing RelationshipPatchSchema export in schemas barrel file - Add @types/express-serve-static-core and @types/ms as direct dev dependencies to fix pnpm module resolution for declaration emit - Fix pre-existing req.params type errors in ticket, consents, and consent-grants routes (string | string[] -> string casts) - Fix UserConsent.create() overload in consents service_id route All TypeScript errors now resolved (was 139 after upstream merge). Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
- Regenerated assets/schemas.json and assets/openapi.json after adding RelationshipPatchSchema export - Add pnpm-lock.yaml for reproducible dependency resolution Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
TypeORM cannot infer the correct PostgreSQL column type for Date | null without an explicit type annotation. This caused a runtime DataTypeNotSupportedError when connecting to postgres. Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
The ConsentsAPI migration assumed user_consents table already existed, but on a fresh database the initial DDL doesn't include it. Add CREATE TABLE IF NOT EXISTS before ALTER TABLE to handle both fresh and existing database cases. Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge upstream/master: 155 commits from spacebarchat/server
Summary
Merges 155 upstream commits from
spacebarchat/serverintoerkinalp/anticensor'sdefaultbranch. This brings in:12 merge conflicts were resolved by merging both fork and upstream features (e.g., fork's TICKET_TRACKER + upstream's thread support in Channel.ts, fork's guild_id + upstream's thread_id in Message.ts).
A follow-up fix commit removes orphaned module exports for files that no longer exist (
ThreadCreateSchema,ChannelPromoteSchema,LobbyCreateSchema,Array,Sentry,ConnectionPrivacy) and drops the stalemissing-native-js-functionsimport from Permissions.ts. The husky pre-commit hook deprecation warnings are also fixed.Updates since last revision (enum renumbering)
Fork-specific enum values in
ChannelTypeandMessageType(insrc/schemas/api/) were silently overwritten during git's auto-merge because only upstream modified those files from the merge base. These have been restored with new numbers to avoid clashing with upstream's assignments:Message.tslocal enum was also updated to add upstream thread types (THREAD_CREATED, THREAD_STARTER_MESSAGE, etc.) and match the new fork numbers.AllowedMentions.parsewidened from("users" | "roles" | "everyone")[]tostring[]in both schemas and entity for plugin extensibility.src/schemas/api/channels/Channel.tsso encrypted channels are treated as text-capable.Additional CI/type-groundwork in this revision:
@spacebar/utilbarrel exports (DateBuilder, ElapsedTime, TimeSpan, Stopwatch, Random, extensions, and networking subtree) to match new upstream structure@spacebar/schemaswhere appropriate (e.g.,ChannelPermissionOverwrite,ChannelType,AutomodRuleSchema)dbEngine; added missing TypeORM types; importedPartialMessage; aligned with new flags usagePermissions.ALL/Permissions.NONEstatic getters referenced by Channel entitydistinct()/single()(used by Channel) underutil/extensions/Array.tsto replace removed polyfill@protobuf-ts/runtimeand@sentry/node.husky/pre-commitnpmBuildScripttobuild:tsgo, includescriptsin source, clean updist/src.tsbuildinfo, trim node_modules)Updates since last revision (TypeScript error resolution)
All TypeScript compilation errors from the upstream merge are now resolved (139 → 0).
Key fixes:
@spacebar/schemasto@spacebar/utilacross greet.ts, threads.ts, callback.ts to resolve enum type conflicts between the two packagespinned_at,interaction_metadata,message_snapshotsfields; mademessage_reference.message_idoptional and addedtypefieldas Messagetype assertions in greet.ts, pins.ts, messages/pins/index.ts to handle TypeORM overload issueschannel.idinstead of channel objectarrayBuffer()instead of missingbytes()method@types/express-serve-static-coreand@types/msas direct dev dependencies for pnpm module resolutionUpdates since last revision (CI runtime fixes)
type: "timestamp"to the@Columndecorator. TypeORM cannot infer the correct PostgreSQL column type forDate | nullwithout this, causingDataTypeNotSupportedErrorat runtime.CREATE TABLE IF NOT EXISTS "user_consents"before theALTER TABLEstatements. On a fresh database, the initial DDL doesn't include this fork-specific table, so the migration must create it first. The migration is now idempotent for both fresh and existing databases.CI build-nix checks now pass.
Review & Testing Checklist for Human
user_consentstable (theCREATE TABLE IF NOT EXISTSshould be a no-op, andADD COLUMN IF NOT EXISTSshould skip existing columns).as Message,as string, andas Embed[]casts were added to suppress TypeScript errors. Spot-check that these don't mask real type mismatches at runtime, especially in pins.ts and Message.ts handler.pinned_atcolumn usestype: "timestamp"which may behave differently across databases.pnpm test) and verify server boots (pnpm build && pnpm start). For full E2E, connect a Discord-compatible client and sanity check channel/message flows, especially pins and thread creation.Notes
assets/openapi.json,assets/schemas.json) regenerated.