File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -591,18 +591,16 @@ pub async fn run(cli: &Cli, cmd: &MessagesCommand) -> Result<()> {
591591 "emoji" : emoji,
592592 "removed" : remove,
593593 } ) ) ?;
594+ } else if * remove {
595+ println ! (
596+ "Removed reaction {} from message {} in chat {}" ,
597+ emoji, msg_id, chat
598+ ) ;
594599 } else {
595- if * remove {
596- println ! (
597- "Removed reaction {} from message {} in chat {}" ,
598- emoji, msg_id, chat
599- ) ;
600- } else {
601- println ! (
602- "Added reaction {} to message {} in chat {}" ,
603- emoji, msg_id, chat
604- ) ;
605- }
600+ println ! (
601+ "Added reaction {} to message {} in chat {}" ,
602+ emoji, msg_id, chat
603+ ) ;
606604 }
607605 }
608606 }
Original file line number Diff line number Diff line change @@ -32,25 +32,26 @@ pub async fn run(cli: &Cli, args: &ReadArgs) -> Result<()> {
3232 }
3333
3434 // Try socket first (but only for simple chat read, not topics)
35- if args. topic . is_none ( ) && !args. all_topics {
36- if crate :: app:: socket:: is_socket_available ( & store_dir) {
37- let resp = crate :: app:: socket:: send_request (
38- & store_dir,
39- crate :: app:: socket:: SocketRequest :: MarkRead {
40- chat : args. chat ,
41- message : args. message ,
42- } ,
43- )
44- . await ?;
35+ if args. topic . is_none ( )
36+ && !args. all_topics
37+ && crate :: app:: socket:: is_socket_available ( & store_dir)
38+ {
39+ let resp = crate :: app:: socket:: send_request (
40+ & store_dir,
41+ crate :: app:: socket:: SocketRequest :: MarkRead {
42+ chat : args. chat ,
43+ message : args. message ,
44+ } ,
45+ )
46+ . await ?;
4547
46- if resp. ok {
47- if cli. json {
48- out:: write_json ( & serde_json:: json!( { "marked_read" : true } ) ) ?;
49- } else {
50- println ! ( "Marked as read." ) ;
51- }
52- return Ok ( ( ) ) ;
48+ if resp. ok {
49+ if cli. json {
50+ out:: write_json ( & serde_json:: json!( { "marked_read" : true } ) ) ?;
51+ } else {
52+ println ! ( "Marked as read." ) ;
5353 }
54+ return Ok ( ( ) ) ;
5455 }
5556 }
5657
Original file line number Diff line number Diff line change @@ -77,9 +77,7 @@ async fn show_user(cli: &Cli, user_id: i64) -> Result<()> {
7777 } = result. into ( ) ;
7878
7979 // Get the UserFull data
80- let full = match full_user {
81- tl:: enums:: UserFull :: Full ( f) => f,
82- } ;
80+ let tl:: enums:: UserFull :: Full ( full) = full_user;
8381
8482 // Find the user in the users list
8583 let user = users. iter ( ) . find_map ( |u| match u {
You can’t perform that action at this time.
0 commit comments