Skip to content

Commit

Permalink
NoPendingCount: Fix for message requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckyz committed Jun 2, 2024
1 parent d8524b0 commit 6e6ee4d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/plugins/noPendingCount/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ export default definePlugin({
replace: "return 0;"
}
},
// New message requests hook
{
find: "useNewMessageRequestsCount:",
predicate: () => settings.store.hideMessageRequestsCount,
replacement: {
match: /getNonChannelAckId\(\i\.\i\.MESSAGE_REQUESTS\).+?return /,
replace: "$&0;"
}
},
// Old message requests hook
{
find: "getMessageRequestsCount(){",
predicate: () => settings.store.hideMessageRequestsCount,
Expand Down

0 comments on commit 6e6ee4d

Please sign in to comment.