Size storage-role query for complete signed-role predicate

This commit is contained in:
evgeny committed 2026-10-18 10:37:19 +02:00
1 parent 01e1772615
commit 4844253f12
1 file changed
+1 -1
+1 -1
View File
@@ -447,7 +447,7 @@ void chat_attachment_want(struct UTUN_INSTANCE* inst, const char* channel, const
/* Автозагрузка обычного участника запрашивает доступ; storage-реплика хранит только ciphertext. */ /* Автозагрузка обычного участника запрашивает доступ; storage-реплика хранит только ciphertext. */
void chat_attachment_downloaded(struct UTUN_INSTANCE* inst, const char* channel, const uint8_t message[32]) { void chat_attachment_downloaded(struct UTUN_INSTANCE* inst, const char* channel, const uint8_t message[32]) {
char sql[256]; snprintf(sql, sizeof(sql), "UPDATE attachment_keys SET downloaded=1,wanted=max(wanted," char sql[384]; snprintf(sql, sizeof(sql), "UPDATE attachment_keys SET downloaded=1,wanted=max(wanted,"
"NOT EXISTS(SELECT 1 FROM peers_%s WHERE node_id=? AND source=0 AND deleted=0 AND length(adm_tags_sig)=64" "NOT EXISTS(SELECT 1 FROM peers_%s WHERE node_id=? AND source=0 AND deleted=0 AND length(adm_tags_sig)=64"
" AND json_extract(adm_tags,'$.storage')='yes')) WHERE channel=? AND message_id=?", channel); " AND json_extract(adm_tags,'$.storage')='yes')) WHERE channel=? AND message_id=?", channel);
sqlite3_stmt* st = ak_prepare(inst, sql); sqlite3_stmt* st = ak_prepare(inst, sql);