fix CallTimer, ReviewDB, SHC & ImplicitRelationships (#4158)

Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: prism <snawalt420@proton.me>
This commit is contained in:
sadan4 2026-04-29 22:20:09 -04:00 • committed by GitHub
parent 1f045a0557
commit daa48d1e79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 9 additions and 16 deletions

View file

@ -80,8 +80,8 @@ export default definePlugin({
find: "renderConnectionStatus(){",
replacement: {
// in renderConnectionStatus()
match: /(lineClamp:1,children:)(\i)(?=,|}\))/,
replace: "$1[$2,$self.renderTimer(this.props.channel.id)]"
match: /(renderConnectionStatus\(\).{0,1000}?lineClamp:1,children:)(\i)(?=,|}\))/,
replace: "$1[$2,$self.renderTimer(this.props?.channel?.id)]"
}
}],

View file

@ -96,7 +96,7 @@ export default definePlugin({
{
find: ".REQUEST_GUILD_MEMBERS,",
replacement: {
match: /\.send\(\i\.REQUEST_GUILD_MEMBERS,{/,
match: /\.send\(\i\.\i\.REQUEST_GUILD_MEMBERS,{/,
replace: "$&nonce:arguments[1].nonce,"
}
},

View file

@ -27,13 +27,6 @@ export default definePlugin({
settings,
patches: [
{
find: '"PLAINTEXT_PREVIEW":"OTHER"',
replacement: {
match: /return"IMAGE"===\i\|\|"VIDEO"===\i(?:\|\|("VISUAL_PLACEHOLDER"===\i)\|\|\i&&"CLIP"===\i)?/,
replace: (_, visualPlaceholderPred) => visualPlaceholderPred != null ? `return ${visualPlaceholderPred}` : "return false"
}
},
{
find: "renderAttachments(",
predicate: () => settings.store.inlineVideo,

View file

@ -94,7 +94,7 @@ export default definePlugin({
{
// User popout
// Same find as ShowConnections
find: "#{intl::XcTHmQ::raw}",
find: "#{intl::USER_PROFILE_FRIEND_REQUEST_TOAST}",
replacement: {
match: /user:(\i),widgets:.{0,100}?\}\),/,
replace: "$&$self.renderProfileComponent({user:$1}),"

View file

@ -162,7 +162,7 @@ export default definePlugin({
patches: [
{
// Same find as ReviewDB
find: "#{intl::XcTHmQ::raw}",
find: "#{intl::USER_PROFILE_FRIEND_REQUEST_TOAST}",
replacement: {
match: /userId:\i\.id,guild:\i\}\)(?=])/,
replace: "$&,$self.profilePopoutComponent(arguments[0])"

View file

@ -157,8 +157,8 @@ export default definePlugin({
predicate: () => settings.store.showMode === ShowMode.LockIcon,
replacement: {
// Lock Icon
match: /(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,70}\(0,\i\.\i\))/,
replace: (_, channel) => `if($self.isHiddenChannel(${channel}))return $self.LockIcon;`
match: /(?<=(\i)\.isNSFW\(\);)switch\(\i\.type\)/,
replace: (m, channel) => `if($self.isHiddenChannel(${channel}))return $self.LockIcon;${m}`
}
},
{
@ -217,7 +217,7 @@ export default definePlugin({
},
{
// Make the state of the old version of unreads box not include hidden channels
find: "ignoreRecents:!0",
find: "GUILD_EVENT)}),[",
replacement: {
match: /(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/,
replace: "&&!$self.isHiddenChannel($1)"

View file

@ -83,7 +83,7 @@ export default definePlugin({
patches: [
{
find: "#{intl::3XohGn::raw}",
find: "#{intl::PAUSE_VOICE_MESSAGE_A11Y_LABEL}",
replacement: {
match: /(?<=\i=)(?=\i\.memo\(.{0,50}?=1,onVolumeChange:[^}]+?waveform:[^}]+?playbackCacheKey:)/,
replace: "$self.VoiceMessage=",