Refactor codebase and standardize unstable prefix usage#746
Merged
Conversation
5b50271 to
58e140b
Compare
58e140b to
e685877
Compare
Contributor
Deploying with
|
| Status | Preview URL | Commit | Alias | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! | https://pr-746-sable.raspy-dream-bb1d.workers.dev | e685877 | pr-746 |
Tue, 05 May 2026 16:23:54 GMT |
7w1
added a commit
that referenced
this pull request
May 5, 2026
<!-- Please read https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before submitting your pull request --> ### Description <!-- Please include a summary of the change. Please also include relevant motivation and context. List any dependencies that are required for this change. --> Fixes the has_cats key that was set to has_cat in #746 #### Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ### Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings ### AI disclosure: - [ ] Partially AI assisted (clarify which code was AI assisted and briefly explain what it does). - [ ] Fully AI generated (explain what all the generated code does in moderate detail). <!-- Write any explanation required here, but do not generate the explanation using AI!! You must prove you understand what the code in this PR does. -->
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.
Description
This pull request standardizes the usage of Matrix event content keys by replacing hardcoded property names and older constants with centralized, unstable prefix constants imported from the
$unstable/prefixesmodule. This change improves maintainability and consistency across the codebase, especially in handling experimental or non-standard Matrix properties.The most important changes are as follows:
Prefix Standardization and Centralization
Replaced all hardcoded Matrix property names and older constants (e.g.,
'com.beeper.per_message_profile','com.beeper.linkpreviews', etc.) with corresponding constants from the$unstable/prefixesmodule throughout the codebase, including message rendering, room creation, user profiles, and input handling.Message Content Handling
Updated all logic for reading, writing, and deleting Matrix event content properties (e.g., per-message profiles, link previews, image source packs, spoilers, blur hashes, forward metadata) to use the new prefix constants, ensuring consistent access and mutation of event content.
User Profile and Room Metadata
Updated user profile extended keys (such as bio, banner, pronouns, timezone, animal identity) in
UserRoomProfile.tsxto use the new prefix constants, replacing all previous hardcoded or legacy key strings.Room Creation and Calls
Changed the room call state event type to use the new unstable prefix constant in room creation utilities.
Code Clean-up
Removed now-unused imports of old constants from files where they have been replaced with the new prefix-based constants.
These changes collectively improve the code's future compatibility with evolving Matrix specifications and make it easier to update property names as they stabilize.
Type of change
Shouldn't cause user facing changes
Checklist:
AI disclosure:
No AI usage