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
9b956320
Commit
9b956320
authored
Aug 27, 2014
by
vvaltman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added accept_secret_chat
parent
4458d2ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
interface.c
interface.c
+6
-0
queries.c
queries.c
+6
-0
No files found.
interface.c
View file @
9b956320
...
...
@@ -373,6 +373,7 @@ struct command commands[] = {
{
"create_group_chat"
,
{
ca_string_end
}},
{
"chat_set_photo"
,
{
ca_chat
,
ca_file_name_end
}},
{
"set_profile_photo"
,
{
ca_file_name_end
}},
{
"accept_secret_chat"
,
{
ca_secret_chat
,
ca_none
}},
{
0
,
{
ca_none
}}
};
...
...
@@ -1573,6 +1574,11 @@ void interpreter (char *line UU) {
tgl_do_restore_msg
(
num
,
0
,
0
);
}
else
if
(
IS_WORD
(
"quit"
))
{
exit
(
0
);
}
else
if
(
IS_WORD
(
"accept_secret_chat"
))
{
GET_PEER_ENCR_CHAT
;
tgl_peer_t
*
E
=
tgl_peer_get
(
id
);
assert
(
E
);
tgl_do_accept_encr_chat_request
(
&
E
->
encr_chat
,
0
,
0
);
}
else
if
(
IS_WORD
(
"safe_quit"
))
{
safe_quit
=
1
;
}
...
...
queries.c
View file @
9b956320
...
...
@@ -2757,6 +2757,12 @@ static struct query_methods get_dh_config_methods = {
};
void
tgl_do_accept_encr_chat_request
(
struct
tgl_secret_chat
*
E
,
void
(
*
callback
)(
void
*
callback_extra
,
int
success
,
struct
tgl_secret_chat
*
E
),
void
*
callback_extra
)
{
if
(
E
->
state
!=
sc_request
)
{
if
(
callback
)
{
callback
(
callback_extra
,
0
,
E
);
return
;
}
}
assert
(
E
->
state
==
sc_request
);
clear_packet
();
...
...
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