mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-07 21:53:04 -04:00
Fix MessageLogger edit history & misc SHC patches
This commit is contained in:
parent
cb8e8bd407
commit
c2e5dcc384
2 changed files with 10 additions and 15 deletions
|
@ -462,13 +462,13 @@ export default definePlugin({
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
// Message content renderer
|
|
||||||
{
|
{
|
||||||
|
// Message content renderer
|
||||||
find: ".SEND_FAILED,",
|
find: ".SEND_FAILED,",
|
||||||
replacement: {
|
replacement: {
|
||||||
// Render editHistory in the deepest div for message content
|
// Render editHistory behind the message content
|
||||||
match: /(\)\("div",\{id:.+?children:\[)/,
|
match: /\.isFailed]:.+?children:\[/,
|
||||||
replace: "$1 (!!arguments[0].message.editHistory?.length && $self.renderEdits(arguments[0])),"
|
replace: "$&arguments[0]?.message?.editHistory?.length>0&&$self.renderEdits(arguments[0]),"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -356,15 +356,10 @@ export default definePlugin({
|
||||||
find: "#{intl::CHANNEL_CALL_CURRENT_SPEAKER}",
|
find: "#{intl::CHANNEL_CALL_CURRENT_SPEAKER}",
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
// Remove the divider and the open chat button for the HiddenChannelLockScreen
|
// Remove the open chat button for the HiddenChannelLockScreen
|
||||||
match: /"more-options-popout"\)\),(?<=channel:(\i).+?inCall:(\i).+?)/,
|
match: /(?<=&&)\i\.push\(.{0,120}"chat-spacer"/,
|
||||||
replace: (m, channel, inCall) => `${m}${inCall}||!$self.isHiddenChannel(${channel},true)&&`
|
replace: "(arguments[0]?.inCall||!$self.isHiddenChannel(arguments[0]?.channel,true))&&$&"
|
||||||
},
|
}
|
||||||
{
|
|
||||||
// Remove invite users button for the HiddenChannelLockScreen
|
|
||||||
match: /"popup".{0,100}?if\((?<=channel:(\i).+?inCall:(\i).+?)/,
|
|
||||||
replace: (m, channel, inCall) => `${m}(${inCall}||!$self.isHiddenChannel(${channel},true))&&`
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -427,8 +422,8 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Remove the open chat button for the HiddenChannelLockScreen
|
// Remove the open chat button for the HiddenChannelLockScreen
|
||||||
match: /"recents".+?&&(?=\(.+?channelId:(\i)\.id,showRequestToSpeakSidebar)/,
|
match: /(?<=&&)\(0,\i\.jsxs?\).{0,180}\.buttonIcon/,
|
||||||
replace: (m, channel) => `${m}!$self.isHiddenChannel(${channel})&&`
|
replace: "!$self.isHiddenChannel(arguments[0]?.channel,true)&&$&"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue