v0.0.33 - Skip self-sent NIP-17 sender-copy DMs to prevent self-reply loops
This commit is contained in:
@@ -51,11 +51,11 @@ Agents learn capabilities through skills — Nostr events that any agent can di
|
||||
|
||||
Didactyl will support local inference, which is very privacy preserving. Remote inference does however have it's advantages, and in those cases Didactyl supports using Bitcoin Lightning and eCash inference providers.
|
||||
|
||||
## Current Status — v0.0.32
|
||||
## Current Status — v0.0.33
|
||||
|
||||
**Active build — this project is barely working. Experiment at your own risk.**
|
||||
|
||||
> Last release update: v0.0.32 — Prevent NIP-17 old message reprocessing by guarding rumor created_at against startup time
|
||||
> Last release update: v0.0.33 — Skip self-sent NIP-17 sender-copy DMs to prevent self-reply loops
|
||||
|
||||
- Connects to configured relays with auto-reconnect and relay state transition logging
|
||||
- Publishes configured startup events per relay as each relay becomes connected
|
||||
|
||||
+6688
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -12,8 +12,8 @@
|
||||
// Using DIDACTYL_ prefix to avoid conflicts with nostr_core_lib VERSION macros
|
||||
#define DIDACTYL_VERSION_MAJOR 0
|
||||
#define DIDACTYL_VERSION_MINOR 0
|
||||
#define DIDACTYL_VERSION_PATCH 32
|
||||
#define DIDACTYL_VERSION "v0.0.32"
|
||||
#define DIDACTYL_VERSION_PATCH 33
|
||||
#define DIDACTYL_VERSION "v0.0.33"
|
||||
|
||||
// Agent metadata
|
||||
#define DIDACTYL_NAME "Didactyl"
|
||||
|
||||
+9
-5
@@ -681,6 +681,14 @@ static void on_event(cJSON* event, const char* relay_url, void* user_data) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(sender_pubkey_hex, g_cfg->keys.public_key_hex) == 0) {
|
||||
DEBUG_TRACE("[didactyl] DEBUG on_event: ignoring self-sent DM %.16s... via %s",
|
||||
sender_pubkey_hex,
|
||||
relay_url ? relay_url : "unknown relay");
|
||||
free(decrypted);
|
||||
return;
|
||||
}
|
||||
|
||||
didactyl_sender_tier_t tier = sender_tier_from_pubkey(sender_pubkey_hex);
|
||||
|
||||
DEBUG_TRACE("[didactyl] DEBUG on_event: sender=%.16s... tier=%d (admin=%.16s...)",
|
||||
@@ -1147,11 +1155,7 @@ int nostr_handler_subscribe_dms(dm_callback_t callback, void* user_data) {
|
||||
}
|
||||
|
||||
if (need_kind1059) {
|
||||
const time_t lookback_secs = 2 * 24 * 60 * 60;
|
||||
time_t since_1059 = g_start_time - lookback_secs;
|
||||
if (since_1059 < 0) {
|
||||
since_1059 = 0;
|
||||
}
|
||||
time_t since_1059 = g_start_time;
|
||||
|
||||
cJSON* filter1059 = cJSON_CreateObject();
|
||||
cJSON* kinds1059 = cJSON_CreateArray();
|
||||
|
||||
Reference in New Issue
Block a user