aboutsummaryrefslogtreecommitdiff
path: root/xmpp/handlers.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2024-02-11 00:27:08 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2024-02-11 00:27:08 +0300
commitdc6f99dc3ca0906bfd5f9bda9eab618445cfa878 (patch)
tree699905531d2b5afc88adf7a6879825975e93ddc4 /xmpp/handlers.go
parent772246ee4b78883ebacdf594e1fc1d485dcb3a58 (diff)
Stable command order in help and Ad-Hoc list
Diffstat (limited to 'xmpp/handlers.go')
-rw-r--r--xmpp/handlers.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmpp/handlers.go b/xmpp/handlers.go
index 08278d2..c50dd1c 100644
--- a/xmpp/handlers.go
+++ b/xmpp/handlers.go
@@ -557,7 +557,8 @@ func handleGetDiscoItems(s xmpp.Sender, iq *stanza.IQ, di *stanza.DiscoItems) {
}
commands := telegram.GetCommands(cmdType)
- for name, command := range commands {
+ for _, name := range telegram.SortedCommandKeys(commands) {
+ command := commands[name]
di.AddItem(iq.To, name, telegram.CommandToHelpString(name, command))
}
} else {