Update json-tg.c
This commit is contained in:
parent
cf6cb90230
commit
f3eabae061
@ -111,8 +111,11 @@ json_t *json_pack_peer (tgl_peer_id_t id) {
|
|||||||
assert (json_object_set (res, "print_name", json_string (s)) >= 0);
|
assert (json_object_set (res, "print_name", json_string (s)) >= 0);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
if(P->print_name != NULL){
|
||||||
assert (json_object_set (res, "print_name", json_string (P->print_name)) >= 0);
|
assert (json_object_set (res, "print_name", json_string (P->print_name)) >= 0);
|
||||||
|
} else {
|
||||||
|
assert (json_object_set (res, "print_name", json_string ("")) >= 0);
|
||||||
|
}
|
||||||
assert (json_object_set (res, "flags", json_integer (P->flags)) >= 0);
|
assert (json_object_set (res, "flags", json_integer (P->flags)) >= 0);
|
||||||
|
|
||||||
switch (tgl_get_peer_type (id)) {
|
switch (tgl_get_peer_type (id)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user