Upgrade group avatar columns before notifying database readiness
This commit is contained in:
1 parent
5c772aeecf
commit
e8365fdec6
2 files changed
+9
No files matched your search
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "chat_core_priv.h"
|
||||
#include "group_avatar.h"
|
||||
#include "chat_event.h"
|
||||
#include "chat_setting.h"
|
||||
#include "chat_member.h"
|
||||
@@ -101,6 +102,10 @@ int chat_core_init(struct UTUN_INSTANCE* inst, const char* db_path) {
|
||||
sqlite3_exec(cc->db, "PRAGMA foreign_keys=ON", NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
if (group_avatar_schema_init(cc->db) < 0) {
|
||||
if (!cc->shared_db) sqlite3_close(cc->db);
|
||||
inst->chat_core = NULL; u_free(cc); return -1;
|
||||
}
|
||||
cc->inst = inst;
|
||||
cc->my_node_id = inst->node_id;
|
||||
|
||||
|
||||
Reference in new issue
Block a user