Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
dd748e1b
Commit
dd748e1b
authored
Oct 10, 2015
by
V V
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small changes in python
parent
9fd8a07d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
json-tg.c
json-tg.c
+5
-4
No files found.
json-tg.c
View file @
dd748e1b
...
...
@@ -20,16 +20,16 @@ void json_pack_peer_type (json_t *res, tgl_peer_id_t id) {
int
x
=
tgl_get_peer_type
(
id
);
switch
(
x
)
{
case
TGL_PEER_USER
:
assert
(
json_object_set
(
res
,
"type"
,
json_string
(
"user"
))
>=
0
);
assert
(
json_object_set
(
res
,
"
peer_
type"
,
json_string
(
"user"
))
>=
0
);
break
;
case
TGL_PEER_CHAT
:
assert
(
json_object_set
(
res
,
"type"
,
json_string
(
"chat"
))
>=
0
);
assert
(
json_object_set
(
res
,
"
peer_
type"
,
json_string
(
"chat"
))
>=
0
);
break
;
case
TGL_PEER_ENCR_CHAT
:
assert
(
json_object_set
(
res
,
"type"
,
json_string
(
"encr_chat"
))
>=
0
);
assert
(
json_object_set
(
res
,
"
peer_
type"
,
json_string
(
"encr_chat"
))
>=
0
);
break
;
case
TGL_PEER_CHANNEL
:
assert
(
json_object_set
(
res
,
"type"
,
json_string
(
"channel"
))
>=
0
);
assert
(
json_object_set
(
res
,
"
peer_
type"
,
json_string
(
"channel"
))
>=
0
);
break
;
default:
assert
(
0
);
...
...
@@ -101,6 +101,7 @@ json_t *json_pack_peer (tgl_peer_id_t id) {
assert
(
json_object_set
(
res
,
"id"
,
json_string
(
print_permanent_peer_id
(
id
)))
>=
0
);
json_pack_peer_type
(
res
,
id
);
assert
(
json_object_set
(
res
,
"peer_id"
,
json_integer
(
tgl_get_peer_id
(
id
)))
>=
0
);
assert
(
res
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment