mirror of
https://dev.narayana.im/narayana/telegabber.git
synced 2026-08-05 04:07:07 +00:00
Add /status transport command
This commit is contained in:
parent
375c2812c0
commit
cf2183e9ca
1 changed files with 3 additions and 0 deletions
|
|
@ -63,6 +63,7 @@ var transportCommands = map[string]command{
|
||||||
"setbio": command{0, []string{"Lorem ipsum"}, "update about", true, nil, true},
|
"setbio": command{0, []string{"Lorem ipsum"}, "update about", true, nil, true},
|
||||||
"setpassword": command{0, []string{"old", "new"}, "set or remove password", true, nil, true},
|
"setpassword": command{0, []string{"old", "new"}, "set or remove password", true, nil, true},
|
||||||
"config": command{0, []string{"param", "value"}, "view or update configuration options", false, nil, false},
|
"config": command{0, []string{"param", "value"}, "view or update configuration options", false, nil, false},
|
||||||
|
"status": command{0, []string{}, "display current login stage", false, nil, false},
|
||||||
"report": command{2, []string{"chat", "comment"}, "report a chat by id or @username", true, nil, true},
|
"report": command{2, []string{"chat", "comment"}, "report a chat by id or @username", true, nil, true},
|
||||||
"add": command{1, []string{"@username"}, "add @username to your chat list", true, nil, true},
|
"add": command{1, []string{"@username"}, "add @username to your chat list", true, nil, true},
|
||||||
"join": command{1, []string{"https://t.me/invite_link"}, "join to chat via invite link or @publicname", true, nil, true},
|
"join": command{1, []string{"https://t.me/invite_link"}, "join to chat via invite link or @publicname", true, nil, true},
|
||||||
|
|
@ -517,6 +518,8 @@ func (c *Client) ProcessTransportCommand(cmdline string, resource string) (strin
|
||||||
}
|
}
|
||||||
|
|
||||||
return strings.Join(entries, "\n"), true
|
return strings.Join(entries, "\n"), true
|
||||||
|
case "status":
|
||||||
|
return fmt.Sprintf("Login stage: %v\nLogin: %v", c.loginStage, c.Session.Login), true
|
||||||
case "report":
|
case "report":
|
||||||
contact, _, err := c.GetContactByUsername(args[0], false)
|
contact, _, err := c.GetContactByUsername(args[0], false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue