dm: прямой обмен сообщениями (DM) + soundtouch + архитектура звонков
- src/dm/: dm_core/dm_crypto/dm_mailbox — прямой обмен сообщениями (DM) - lib/soundtouch-master/: vendored SoundTouch (изменение темпа/высоты аудио) - doc/dm_arch.md, doc/chat_call_arch.md: архитектура DM и звонков - tests: test_dm.c, test_dm_e2e.c - chat: рефакторинг chat_* модулей, member_sync, invite_build - chatgui/chatgui-android: синхронизация с новым API чата - lib/u_async, debug_config, utun_instance: сопутствующие изменения
This commit is contained in:
1 parent
761f64cf76
commit
73fe99b33f
123 files changed
+14095
-1270
No files matched your search
@@ -4,6 +4,7 @@
|
||||
#include "headless_control.h"
|
||||
#include "../libutun_lite/utun_config_api.h"
|
||||
#include "../libutun_lite/invite_link_c.h"
|
||||
#include "../libutun_lite/instance_lite.h"
|
||||
#include "../../../src/chat/chat_setting.h"
|
||||
#include "../../../src/chat/chat_sync.h"
|
||||
#include "../../../lib/debug_config.h"
|
||||
@@ -315,7 +316,13 @@ static int handle_join(int fd, int id, const char* json) {
|
||||
}
|
||||
|
||||
DEBUG_INFO(DEBUG_CATEGORY_GENERAL, "join: calling chat_sync_connect_from_invite...");
|
||||
chat_sync_connect_from_invite(d.channelId, d.nodeId, d.pubkey, addrs_buf, d.addrCount, addrs_len, d.password, d.join_key);
|
||||
struct UTUN_INSTANCE* inst = instance_lite_get_instance();
|
||||
if (!inst) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_GENERAL, "join: no instance running — drop");
|
||||
send_response(fd, id, NULL, "instance not running");
|
||||
return 0;
|
||||
}
|
||||
chat_sync_connect_from_invite(inst, d.channelId, d.nodeId, d.pubkey, addrs_buf, d.addrCount, addrs_len, d.password, d.join_key);
|
||||
|
||||
char resp[512];
|
||||
snprintf(resp, sizeof(resp),
|
||||
@@ -331,7 +338,9 @@ static int handle_chat_setting(int fd, int id, const char* json) {
|
||||
send_response(fd, id, NULL, "missing name or value");
|
||||
return 0;
|
||||
}
|
||||
int rc = chat_setting_set(name, value);
|
||||
struct UTUN_INSTANCE* inst = instance_lite_get_instance();
|
||||
if (!inst) { send_response(fd, id, NULL, "instance not running"); return 0; }
|
||||
int rc = chat_setting_set(inst, name, value);
|
||||
if (rc == -1) { send_response(fd, id, NULL, "unknown setting"); return 0; }
|
||||
if (rc == -2) { send_response(fd, id, NULL, "invalid value"); return 0; }
|
||||
printf("control: chat_setting %s=%s\n", name, value);
|
||||
|
||||
Reference in new issue
Block a user