setVoiceMessageRoles now checks for '*' marker, translates URL-safe
base64 (-_ → +/) and decodes to restore original display data.
Fixes attachment filenames and voice waveform for new messages.
Android: file picker → pending preview bar (name+size+X) →
combined send with text; cache copy, save dialog for downloads
Desktop: attach stores pending, preview bar before send,
combined with text in onSendClicked
C: attachment_sender.c — include filename in msg data for display
- stcp_server_create: support AF_INET and AF_INET6 V6ONLY=1 (no dual-stack)
- Add listen_family to stcp_link_config
- init_sockets: return error (not partial) on any bind failure
- add chat_core_sync_my_addresses() call at chatgui startup
- collect_my_addrs: add proto byte (1=UDP, 2=TCP) to binary format
- chat_sync.c JOIN/WELCOME/PEER_UPSERT: read proto byte, write protocol column
- member_sync.c: read proto byte, dynamic protocol bind
- topo_node.c: debug logs for nodeinfo changed detection
- node_config.cpp: type=public for all servers
- Replace instance->stcp_server (single pointer) with stcp_servers linked list
- Add stcp_server_list_add/destroy_all/count API in stcp_link.h/c
- Fix port extraction for both AF_INET and AF_INET6 in init_sockets
- Filter out 0.0.0.0 and [::] addresses in chat_profile.c TCP address sync
- Add type=public to servers in node_config.cpp saveFull()
- conn_mgr_core.c: убрана запись node_name из cm_handle_invite_info_resp
- topo_node_sqlite.c: name в nodes не перезаписывается пустой строкой
- android_jni_bridge.c: bridge_get_node_name читает peers_<ch>.userinfo если nodes.name пуст
Android chatgui:
- New MemberListScreen with member list, detail card, edit dialog
- Link status dots (green/red/grey) per address in detail card (1s poll)
- Self-node name coloured green
- ChatScreen: people icon in TopAppBar
IPv6 autoconnect fixes (3 bugs in conn_mgr/topo):
- topo_node_sqlite_node_load: load v6 addresses from DB
- topo_node_registry_store: merge v6_addrs into existing node
- cm_sock_v6_classify: wildcard [::] treated as CM_V6_DIR
- cm_add_v6_link: htons(port) was missing
Memory fixes:
- strdup→u_strdup in bridge (7 instances)
- u_realloc cap update before success check (3 instances)
- char sql[256]→[512] for truncated SELECT
Chat member hash now includes addresses for change detection
Linux chatgui:
- Link status dots in AccountList detail panel (1s poll)
- Self-node name in green in member list
- inputbar.cpp: CSV waveform → base64 log-scale (same as voice_recorder.c)
- messagelist.cpp: sendVoiceMessage removes displayName|dur_sec| prefix, uses wfStr directly
setVoiceMessageRoles: decodes new format wf={base64};dur={ms};|... from data field
- messagedelegate.cpp: waveform values now pre-normalized 0..1, no log recalculation needed
- VoiceEncoder: no changes needed (was already compatible)
Both platforms now store identical format in chat_msg_submit.data:
wf=ABCDef...100chars;dur=NNNN;|file_size|block_size|num_blocks|sigs_hex
- Создан src/chat/ с chat_event.h/c — система нотификаций
- Перенесены chat_core, chat_msg, chat_channel, chat_profile, chat_status
- Перенесены chat_sync, member_sync, merkle_sync, db_sync
- gui_bridge_post() заменён на chat_event_post() с возможностью регистрации обработчика
- chat_event_set_handler() — chatgui регистрирует мост в gui_bridge
- Без обработчика: события логируются через DEBUG_DEBUG + log_dump
- chat интегрирован в utun_instance.c (при db_path в конфиге)
- Обновлены include-пути, Makefile.am, CMakeLists.txt
- Из chatgui удалены старые transport/ файлы, обновлён utun_node.cpp
- InputBar: QProgressBar with gradient (green→yellow→red) in recording overlay
- updateRecordingUI: computes dB from peakLevel, updates bar every 100ms
- showRecordOverlay: resets bar to 0 on new recording
- Waveform bars: linear→logarithmic (dB mapping -60..0dB)
- Colors: idle gray visible (130 alpha), played blue, unplayed dim blue
- Min bar height: 1→2px
- Duration: fallback to MsgVoiceDurationRole when not playing (was 0:00/0:00)
- Debug log: wfN, width, first value, dB, barH
- AudioRecorder: sliding window RMS (avg 5 frames), waveformLevels() getter
- InputBar: downsample RMS to 100 samples, encode as wf0,wf1,... in textData
- MessageList: parse 3rd pipe-separated field as waveform, store in MsgVoiceWaveformRole
- MessageDelegate: new voice layout (16px play btn + 25px waveform + 3px progress bar)
- MessageDelegate: waveform bars colored by progress (blue before, gray after)
- Progress bar integrated at bottom of waveform area as colored fill
- stopCurrentPcm(): only ma_sound_stop, no delete/uninit in runtime
- playRawPcm(): just stop old sound, create new objects (old ones leak until shutdown)
- shutdown(): cleanup accumulated ma_sound + ma_audio_buffer after engine uninit
- root cause: deleting audio objects from GUI thread while miniaudio worker reads them
- SoundManager: pauseCurrentPcm()/resumeCurrentPcm() — stop/start without destroy
- VoicePlayState: added paused/pausedPosSec fields
- editorEvent: 3-state logic — playing→pause, paused→resume, stopped→new
- Different file click: stops old with full cleanup, plays new from start
- Timer: skips paused items, full cleanup on auto-complete
- SoundManager: added stopCurrentPcm() for pause/stop of PCM playback
- messagedelegate: call stopCurrentPcm on pause, new play, and timer complete
- messagelist: skip old double-nested JSON messages (raw starts with '{')
- sound_manager.h: void* for ma_audio_buffer to avoid header dependency
- chatview: QListView::mousePressEvent(event) instead of event->accept()
(Qt needs base class press to set pressedIndex for editorEvent to fire)
- messagedelegate: GUI_DEBUG replaces qDebug (writes to log file)
- voiceplayback: DEBUG_DEBUG/DEBUG_WARN + debug_config.h include
- voicemessageencoder: same debug migration
- inputbar: GUI_INFO replaces qDebug
- messagelist: DEBUG_DEBUG/DEBUG_WARN replaces qDebug/qWarning
- db_manager: getMessagesSince() now parses m.contentType from JSON (was missing)
- messagelist: setVoiceMessageRoles uses data directly as payload, not re-parsed as JSON
(data is already the 'd' field value extracted by db_manager)
- req->data now stores 'filename|duration' instead of full nested JSON
- chat_core_submit_message builds the JSON with d='filename|duration'
- setVoiceMessageRoles splits d field by '|' to extract filename and duration