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
ffe31ad3
Commit
ffe31ad3
authored
Oct 14, 2015
by
V V
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added channel_get_members/channel_get_admins query
parent
3eed2257
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
interface.c
interface.c
+14
-0
tgl
tgl
+1
-1
No files found.
interface.c
View file @
ffe31ad3
...
...
@@ -1120,6 +1120,18 @@ void do_channel_kick (struct command *command, int arg_num, struct arg args[], s
tgl_do_channel_kick_user
(
TLS
,
args
[
0
].
peer_id
,
args
[
1
].
peer_id
,
print_success_gw
,
ev
);
}
void
do_channel_get_members
(
struct
command
*
command
,
int
arg_num
,
struct
arg
args
[],
struct
in_ev
*
ev
)
{
assert
(
arg_num
==
3
);
if
(
ev
)
{
ev
->
refcnt
++
;
}
tgl_do_channel_get_members
(
TLS
,
args
[
0
].
peer_id
,
args
[
1
].
num
==
NOT_FOUND
?
100
:
args
[
1
].
num
,
args
[
2
].
num
==
NOT_FOUND
?
0
:
args
[
2
].
num
,
0
,
print_user_list_gw
,
ev
);
}
void
do_channel_get_admins
(
struct
command
*
command
,
int
arg_num
,
struct
arg
args
[],
struct
in_ev
*
ev
)
{
assert
(
arg_num
==
3
);
if
(
ev
)
{
ev
->
refcnt
++
;
}
tgl_do_channel_get_members
(
TLS
,
args
[
0
].
peer_id
,
args
[
1
].
num
==
NOT_FOUND
?
100
:
args
[
1
].
num
,
args
[
2
].
num
==
NOT_FOUND
?
0
:
args
[
2
].
num
,
1
,
print_user_list_gw
,
ev
);
}
/* }}} */
/* {{{ WORKING WITH USERS */
...
...
@@ -1593,6 +1605,8 @@ struct command commands[MAX_COMMANDS_SIZE] = {
{
"add_contact"
,
{
ca_string
,
ca_string
,
ca_string
,
ca_none
},
do_add_contact
,
"add_contact <phone> <first name> <last name>
\t
Tries to add user to contact list"
,
NULL
},
{
"block_user"
,
{
ca_user
,
ca_none
},
do_block_user
,
"block_user <user>
\t
Blocks user"
,
NULL
},
{
"broadcast"
,
{
ca_user
,
ca_period
,
ca_string_end
,
ca_none
},
do_broadcast
,
"broadcast <user>+ <text>
\t
Sends text to several users at once"
,
NULL
},
{
"channel_get_admins"
,
{
ca_channel
,
ca_number
|
ca_optional
,
ca_number
|
ca_optional
,
ca_none
},
do_channel_get_admins
,
"channel_get_admins <channel> [limit=100] [offset=0]
\t
Gets channel admins"
,
NULL
},
{
"channel_get_members"
,
{
ca_channel
,
ca_number
|
ca_optional
,
ca_number
|
ca_optional
,
ca_none
},
do_channel_get_members
,
"channel_get_members <channel> [limit=100] [offset=0]
\t
Gets channel members"
,
NULL
},
{
"channel_info"
,
{
ca_channel
,
ca_none
},
do_channel_info
,
"channel_info <channel>
\t
Prints info about channel (id, members, admin, etc.)"
,
NULL
},
{
"channel_invite"
,
{
ca_channel
,
ca_user
,
ca_none
},
do_channel_invite
,
"channel_invite <channel> <user>
\t
Invites user to channel"
,
NULL
},
{
"channel_join"
,
{
ca_channel
,
ca_none
},
do_join_channel
,
"channel_join <channel>
\t
Joins to channel"
,
NULL
},
...
...
tgl
@
2b535170
Subproject commit
42660816b2ad079c091dc6f1fa4de839df328049
Subproject commit
2b535170c740023a45f3eb567a781edc1beecaed
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