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
17fc871f
Commit
17fc871f
authored
Sep 30, 2015
by
V V
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interface: fixed output of forwarded messages
parent
8b0ff908
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
interface.c
interface.c
+18
-10
No files found.
interface.c
View file @
17fc871f
...
...
@@ -3708,15 +3708,23 @@ void print_encr_chat_name (struct in_ev *ev, tgl_peer_id_t id, tgl_peer_t *C) {
mpop_color
(
ev
);
}
void
print_encr_chat_name_full
(
struct
in_ev
*
ev
,
tgl_peer_id_t
id
,
tgl_peer_t
*
C
)
{
assert
(
tgl_get_peer_type
(
id
)
==
TGL_PEER_ENCR_CHAT
);
mpush_color
(
ev
,
COLOR_MAGENTA
);
if
(
!
C
||
use_ids
)
{
mprintf
(
ev
,
"encr_chat#%d"
,
tgl_get_peer_id
(
id
));
}
else
{
mprintf
(
ev
,
"%s"
,
C
->
print_name
);
void
print_peer_name
(
struct
in_ev
*
ev
,
tgl_peer_id_t
id
,
tgl_peer_t
*
C
)
{
switch
(
tgl_get_peer_type
(
id
))
{
case
TGL_PEER_USER
:
print_user_name
(
ev
,
id
,
C
);
return
;
case
TGL_PEER_CHAT
:
print_chat_name
(
ev
,
id
,
C
);
return
;
case
TGL_PEER_CHANNEL
:
print_channel_name
(
ev
,
id
,
C
);
return
;
case
TGL_PEER_ENCR_CHAT
:
print_encr_chat_name
(
ev
,
id
,
C
);
return
;
default:
assert
(
0
);
}
mpop_color
(
ev
);
}
static
char
*
monthes
[]
=
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dec"
};
...
...
@@ -3990,9 +3998,9 @@ void print_message (struct in_ev *ev, struct tgl_message *M) {
mprintf
(
ev
,
" »»» "
);
}
}
if
(
tgl_get_peer_type
(
M
->
fwd_from_id
)
==
TGL_PEER_USER
)
{
if
(
tgl_get_peer_type
(
M
->
fwd_from_id
)
>
0
)
{
mprintf
(
ev
,
"[fwd from "
);
print_
us
er_name
(
ev
,
M
->
fwd_from_id
,
tgl_peer_get
(
TLS
,
M
->
fwd_from_id
));
print_
pe
er_name
(
ev
,
M
->
fwd_from_id
,
tgl_peer_get
(
TLS
,
M
->
fwd_from_id
));
mprintf
(
ev
,
"] "
);
}
if
(
M
->
reply_id
)
{
...
...
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