Skip to content

Commit

Permalink
Bot: Suggest client's email address for new accounts
Browse files Browse the repository at this point in the history
Before TG name + TG ID was used as a suggestion while approving
new accounts on the panel. Now email address will be used
instead, if the field is not empty.
  • Loading branch information
mjef committed Mar 27, 2023
1 parent 4a183cc commit d545ff8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/html/xui/tg_client_approval.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@
this.tgClient = new TgClient(tgClient);
if (newClient) {
this.addClient(this.inbound);
this.client.email = tgClient.clientName.replace(/ /g,"_");
this.client.email = tgClient.clientEmail.trim()
if (this.client.email == "") {
this.client.email = tgClient.clientName.replace(/ /g,"_");
}
} else {
this.client = this.fetchClient(this.inbound, this.tgClient.clientUid);
}
Expand Down

0 comments on commit d545ff8

Please sign in to comment.