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
969da088
Commit
969da088
authored
Aug 20, 2014
by
vvaltman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of adm239:tg
Conflicts: interface.c tgl.h
parents
f58b812b
d1096cba
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
113 deletions
+93
-113
binlog.c
binlog.c
+57
-92
interface.c
interface.c
+4
-6
structures.c
structures.c
+1
-1
tgl.h
tgl.h
+27
-10
updates.c
updates.c
+4
-4
No files found.
binlog.c
View file @
969da088
This diff is collapsed.
Click to expand it.
interface.c
View file @
969da088
...
...
@@ -680,7 +680,7 @@ void interpreter_chat_mode (char *line) {
tgl_do_mark_read
(
chat_mode_id
,
0
,
0
);
return
;
}
if
(
strlen
(
line
)
>
0
)
{
if
(
strlen
(
line
)
>
0
)
{
tgl_do_send_message
(
chat_mode_id
,
line
,
strlen
(
line
),
0
,
0
);
}
}
...
...
@@ -736,11 +736,9 @@ struct tgl_update_callback upd_cb = {
.
user_registered
=
0
,
.
user_activated
=
0
,
.
new_authorization
=
0
,
.
secret_chat_created
=
0
,
.
secret_chat_request
=
0
,
.
secret_chat_established
=
0
,
.
secret_chat_deleted
=
0
,
.
secret_chat_accepted
=
0
,
.
user_update
=
0
,
.
chat_update
=
0
,
.
secret_chat_update
=
0
,
.
msg_receive
=
print_message_gw
};
...
...
structures.c
View file @
969da088
...
...
@@ -237,7 +237,7 @@ int tglf_fetch_user (struct tgl_user *U) {
if
(
x
==
CODE_user_contact
)
{
bl_do_user_set_friend
(
U
,
1
);
}
else
{
}
else
{
bl_do_user_set_friend
(
U
,
0
);
}
}
...
...
tgl.h
View file @
969da088
...
...
@@ -14,6 +14,22 @@ struct connection;
struct
mtproto_methods
;
struct
session
;
struct
dc
;
#define TGL_UPDATE_CREATED 1
#define TGL_UPDATE_DELETED 2
#define TGL_UPDATE_PHONE 4
#define TGL_UPDATE_CONTACT 8
#define TGL_UPDATE_PHOTO 16
#define TGL_UPDATE_BLOCKED 32
#define TGL_UPDATE_REAL_NAME 64
#define TGL_UPDATE_NAME 128
#define TGL_UPDATE_REQUESTED 256
#define TGL_UPDATE_WORKING 512
#define TGL_UPDATE_FLAGS 1024
#define TGL_UPDATE_TITLE 2048
#define TGL_UPDATE_ADMIN 4096
#define TGL_UPDATE_MEMBERS 8192
struct
tgl_update_callback
{
void
(
*
new_msg
)(
struct
tgl_message
*
M
);
void
(
*
marked_read
)(
int
num
,
struct
tgl_message
*
list
[]);
...
...
@@ -25,20 +41,21 @@ struct tgl_update_callback {
void
(
*
user_registered
)(
struct
tgl_user
*
U
);
void
(
*
user_activated
)(
struct
tgl_user
*
U
);
void
(
*
new_authorization
)(
const
char
*
device
,
const
char
*
location
);
void
(
*
secret_chat_created
)(
struct
tgl_secret_chat
*
E
);
void
(
*
secret_chat_request
)(
struct
tgl_secret_chat
*
E
);
void
(
*
secret_chat_established
)(
struct
tgl_secret_chat
*
E
);
void
(
*
secret_chat_deleted
)(
struct
tgl_secret_chat
*
E
);
void
(
*
secret_chat_accepted
)(
struct
tgl_secret_chat
*
E
);
void
(
*
new_user
)(
struct
tgl_user
*
U
);
void
(
*
delete_user
)(
struct
tgl_user
*
U
);
void
(
*
update_user_info
)(
struct
tgl_user
*
U
);
//
void (*secret_chat_created)(struct tgl_secret_chat *E);
//
void (*secret_chat_request)(struct tgl_secret_chat *E);
//
void (*secret_chat_established)(struct tgl_secret_chat *E);
//
void (*secret_chat_deleted)(struct tgl_secret_chat *E);
//
void (*secret_chat_accepted)(struct tgl_secret_chat *E);
//
void (*new_user)(struct tgl_user *U);
//
void (*delete_user)(struct tgl_user *U);
//
void (*update_user_info)(struct tgl_user *U);
//void (*secret_chat_delete)(struct tgl_secret_chat *U);
//void (*secret_chat_requested)(struct tgl_secret_chat *U);
//void (*secret_chat_accepted)(struct tgl_secret_chat *U);
//void (*secret_chat_created)(struct tgl_secret_chat *U);
void
(
*
chat_created
)(
struct
tgl_chat
*
C
);
void
(
*
chat_update
)(
struct
tgl_chat
*
C
);
void
(
*
chat_update
)(
struct
tgl_chat
*
C
,
unsigned
flags
);
void
(
*
user_update
)(
struct
tgl_user
*
C
,
unsigned
flags
);
void
(
*
secret_chat_update
)(
struct
tgl_secret_chat
*
C
,
unsigned
flags
);
void
(
*
msg_receive
)(
struct
tgl_message
*
M
);
};
...
...
updates.c
View file @
969da088
...
...
@@ -488,8 +488,8 @@ void tglu_work_update (struct connection *c, long long msg_id) {
pop_color ();
print_end ();*/
if
(
E
->
state
==
sc_request
)
{
if
(
tgl_state
.
callback
.
secret_chat_
request
)
{
/*
if (E->state == sc_request) {
if (tgl_state.callback.secret_chat_
update
) {
tgl_state.callback.secret_chat_request (E);
}
} else if (E->state == sc_ok) {
...
...
@@ -500,7 +500,7 @@ void tglu_work_update (struct connection *c, long long msg_id) {
if (tgl_state.callback.secret_chat_deleted) {
tgl_state.callback.secret_chat_deleted (E);
}
}
}
*/
if
(
E
->
state
==
sc_ok
)
{
tgl_do_send_encr_chat_layer
(
E
);
}
...
...
@@ -753,6 +753,6 @@ void tglu_work_update_short_chat_message (struct connection *c, long long msg_id
void
tglu_work_updates_to_long
(
struct
connection
*
c
,
long
long
msg_id
)
{
assert
(
fetch_int
()
==
(
int
)
CODE_updates_too_long
);
vlogprintf
(
E_NOTICE
,
"updates to long... Getting difference
\n
"
);
vlogprintf
(
E_NOTICE
,
"updates to
o
long... Getting difference
\n
"
);
tgl_do_get_difference
(
0
,
0
,
0
);
}
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