Commit 0227ff1
committed
fix(discord): cap dedup set on thread delete, add #[cfg(test)] to test mod
- Replace retain(|_| true) no-op with a size-capped clear: when
threaded_message_ids exceeds MAX_DEDUP_MSG_IDS (2000) it is cleared.
MESSAGE_UPDATE embed events arrive within seconds so old entries are
always safe to discard; prevents unbounded growth on busy servers.
- Add #[cfg(test)] to mod tests so empty_threads() helper is only
compiled in test mode — removes the need for #[allow(dead_code)].1 parent 525d7d8 commit 0227ff1
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
578 | 582 | | |
579 | 583 | | |
580 | 584 | | |
581 | | - | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
582 | 592 | | |
583 | 593 | | |
584 | 594 | | |
| |||
895 | 905 | | |
896 | 906 | | |
897 | 907 | | |
| 908 | + | |
898 | 909 | | |
899 | 910 | | |
900 | 911 | | |
901 | 912 | | |
902 | | - | |
903 | 913 | | |
904 | 914 | | |
905 | 915 | | |
| |||
0 commit comments