fix(chat): skip initial sound publication when preference reading fails
This commit is contained in:
1 parent
fec2cecdb3
commit
81fdbf90e1
2 files changed
+4
-1
No files matched your search
@@ -24,6 +24,7 @@
|
||||
#include "../../lib/platform_compat.h"
|
||||
|
||||
#include <openssl/evp.h>
|
||||
#include <limits.h>
|
||||
|
||||
void chat_core_set_my_node_id(struct UTUN_INSTANCE* inst, uint64_t node_id) {
|
||||
struct chat_core_ctx* cc = CC(inst);
|
||||
|
||||
@@ -598,7 +598,9 @@ void chat_sync_broadcast_sound_setting(struct UTUN_INSTANCE* inst, const char* c
|
||||
static void cs_send_all_sound_settings(struct chat_sync* cs, uint64_t peer) {
|
||||
for (int i = 0; i < cs->channel_count; i++) {
|
||||
int on = chat_core_get_sound_on_message(cs->inst, cs->channels[i].channel_id);
|
||||
cs_send_sound_setting(cs, cs->channels[i].channel_id, peer, on);
|
||||
if (on >= 0) cs_send_sound_setting(cs, cs->channels[i].channel_id, peer, on);
|
||||
else DEBUG_WARN(DEBUG_CATEGORY_CHAT_SYNC, "sound setting: skip unreadable channel=%s peer=%016llx",
|
||||
cs->channels[i].channel_id, (unsigned long long)peer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user