|
|
|
|
@ -447,7 +447,7 @@ void chat_attachment_want(struct UTUN_INSTANCE* inst, const char* channel, const
|
|
|
|
|
|
|
|
|
|
/* Автозагрузка обычного участника запрашивает доступ; storage-реплика хранит только ciphertext. */ |
|
|
|
|
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" |
|
|
|
|
" AND json_extract(adm_tags,'$.storage')='yes')) WHERE channel=? AND message_id=?", channel); |
|
|
|
|
sqlite3_stmt* st = ak_prepare(inst, sql); |
|
|
|
|
|