fix: resolve multiple upstream issues from spacebarchat/server and MelodyChat/Harmony - #144
Merged
Merged
Conversation
…lodyChat/Harmony - Fix spacebarchat#1550: Only emit MESSAGE_UPDATE when embeds actually change, preventing duplicate messageCreate + messageUpdate events on link-containing messages - Fix spacebarchat#1578: Make embed footer text optional to allow textless footers - Fix spacebarchat#1662: Enforce slowmode rate limiting in POST /channels/:id/typing - Fix spacebarchat#1545: New roles inherit @everyone permissions when none specified - Fix spacebarchat#1339: Always exclude creator from DM channel recipients in responses - Fix spacebarchat#1664: NameValidation throws FieldErrors with proper field names instead of generic HTTPErrors for blocked words - Fix spacebarchat#1553: Ensure public_flags is always a number in DTOs and API responses - Fix #40: Add 32-character limit for nicknames - Fix spacebarchat#1628: Sort messages in DESC order after fetching with 'after' param 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:
|
… masking - ValidateName now accepts optional maxLength parameter (defaults to config maxUsername). Webhook callers pass 80 to match Discord's limit. - Role creation without explicit permissions now also ANDs defaultPermissions with requester bitfield, preventing privilege escalation edge 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.
Summary
Fixes 9 open issues from upstream spacebarchat/server and MelodyChat/Harmony that weren't already addressed in anticensor:
Duplicate embed events (spacebarchat#1550):
fillMessageUrlEmbedspreviously emittedMESSAGE_UPDATEunconditionally (multiple times per message). Now only emits once, and only when embeds actually changed:Slowmode on typing (spacebarchat#1662): Added
rate_limit_per_userenforcement toPOST /channels/:id/typingmatching the pattern used in message creation.Role permission defaults (spacebarchat#1545): New roles without explicit
permissionsnow inherit@everyonepermissions AND-masked with requester permissions (preventing privilege escalation):DM recipients (spacebarchat#1339):
createDMChannelnow always excludes the creator from the returned recipients (previously only excluded for group DMs, not 1:1 DMs).NameValidation field errors (spacebarchat#1664):
ValidateName(name, field, maxLength?)now accepts a field name parameter and optional max length, throwsFieldErrorswith the correct field key instead of genericHTTPError.Webhook name length: Webhook callers now pass
maxLength: 80toValidateName, matching Discord's 80-char webhook name limit (previously capped at 32 like usernames).public_flags type (spacebarchat#1553):
MinimalPublicUserDTOand relationship endpoints now coercepublic_flagsthroughNumber()to prevent bigint strings leaking into JSON responses.Embed footer text (spacebarchat#1578):
Embed.footer.textis now optional in the schema.Nickname length (#40): Added 32-character limit to
Member.changeNicknameand the PATCH member endpoint.Message order (spacebarchat#1628): Messages fetched with
?after=are now re-sorted DESC before returning.Link to Devin session: https://app.devin.ai/sessions/11a7828a7f8c465f9f5ff18e424fff04
Requested by: @erkinalp