Calls [WIP]

This commit is contained in:
Bohdan Horbeshko 2023-05-16 18:20:02 -04:00
parent 9c28af848d
commit 94b51a70df

View file

@ -469,6 +469,22 @@ func discoToCaps(disco *stanza.DiscoInfo) string {
s.WriteString(">") s.WriteString(">")
} }
for disco if disco.Form != nil {
s.WriteString( fields := make([]*stanza.Field, len(disco.Form.Fields))
copy(fields, disco.Form.Fields)
sort.Slice(fields, func(a, b *stanza.Field) bool {
if a.Var == "FORM_TYPE" {
return true
}
if b.Var == "FORM_TYPE" {
return false
}
return a.Var < b.Var
})
for _, field := range fields {
}
}
return s.String()
} }