simple_repeater: filter hash throttle + opt-in message age limit (tth #3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-02 17:40:09 +01:00
1 parent e3029de6e4
commit 548b96d15c
8 files changed
+370 -29

No files matched your search

+7
View File
@@ -81,6 +81,9 @@ public:
// keyless -- works on private channels too. See ChannelFilter.h (`filter hash`).
uint8_t deny_hash[8];
uint8_t deny_hash_n = 0;
uint16_t deny_hash_secs[8]; // per entry: 0 = block, else pass one per N s (throttle)
uint16_t filter_age_min = 0; // drop decrypted group texts older than this; 0 = off
uint8_t filter_dry_run = 0; // count `filter` verdicts, forward anyway
// Battery state as an icon on the advertised name (see BatteryIcon.h).
// Off by default: it costs bytes of the name, so it has to be asked for.
uint8_t batt_icon = 0; // boolean
@@ -212,6 +215,9 @@ private:
def("f_deny", _parent->filter_deny, sizeof(_parent->filter_deny));
def("f_dhash", (void*)_parent->deny_hash, sizeof(_parent->deny_hash));
def("f_dhash_n", _parent->deny_hash_n);
def("f_dhash_s", (void*)_parent->deny_hash_secs, sizeof(_parent->deny_hash_secs));
def("f_age", _parent->filter_age_min);
def("f_dry", _parent->filter_dry_run);
def("fair_gcap", _parent->fair_group_cap);
def("fair_scap", _parent->fair_sender_cap);
def("fair_acap", _parent->fair_advert_cap);
@@ -267,6 +273,7 @@ public:
owner_info[0] = 0;
filter_deny[0] = 0;
memset(deny_hash, 0, sizeof(deny_hash));
memset(deny_hash_secs, 0, sizeof(deny_hash_secs));
}
CommonRadioPrefs* getRadioPrefs() { return &radio; }