Skip to content

Commit 5d29294

Browse files
author
V V
committed
2 parents e7035d7 + 0881c5d commit 5d29294

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

interface.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,12 @@ void do_set_username (struct command *command, int arg_num, struct arg args[], s
10291029
tgl_do_set_username (TLS, ARG2STR (0), print_user_gw, ev);
10301030
}
10311031

1032+
void do_set_phone_number (struct command *command, int arg_num, struct arg args[], struct in_ev *ev) {
1033+
assert (arg_num == 1);
1034+
if (ev) { ev->refcnt ++; }
1035+
tgl_do_set_phone_number (TLS, ARG2STR (0), print_success_gw, ev);
1036+
}
1037+
10321038
void do_status_online (struct command *command, int arg_num, struct arg args[], struct in_ev *ev) {
10331039
assert (!arg_num);
10341040
if (ev) { ev->refcnt ++; }
@@ -1706,6 +1712,7 @@ struct command commands[MAX_COMMANDS_SIZE] = {
17061712
{"set_profile_photo", {ca_file_name_end, ca_none}, do_set_profile_photo, "set_profile_photo <filename>\tSets profile photo. Photo will be cropped to square", NULL},
17071713
{"set_ttl", {ca_secret_chat, ca_number, ca_none}, do_set_ttl, "set_ttl <secret chat>\tSets secret chat ttl. Client itself ignores ttl", NULL},
17081714
{"set_username", {ca_string, ca_none}, do_set_username, "set_username <name>\tSets username.", NULL},
1715+
{"set_phone_number", {ca_string, ca_none}, do_set_phone_number, "set_phone_number <phone>\tChanges the phone number of this account", NULL},
17091716
{"show_license", {ca_none}, do_show_license, "show_license\tPrints contents of GPL license", NULL},
17101717
{"start_bot", {ca_user, ca_chat, ca_string, ca_none}, do_start_bot, "start_bot <bot> <chat> <data>\tAdds bot to chat", NULL},
17111718
{"stats", {ca_none}, do_stats, "stats\tFor debug purpose", NULL},

loop.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,8 @@ void read_secret_chat (int fd, int v) {
660660
&last_in_seq_no,
661661
&out_seq_no,
662662
&key_fingerprint,
663-
TGLECF_CREATE | TGLECF_CREATED
663+
TGLECF_CREATE | TGLECF_CREATED,
664+
NULL, 0
664665
);
665666

666667
}

0 commit comments

Comments
 (0)