- Changed IQ stanzas to pointer semantics

- Fixed commands from v 0.4.0 and tests
- Added primitive Result Sets support (XEP-0059)
This commit is contained in:
rcorniere
2020-01-31 11:48:03 +01:00
parent 84665d8c13
commit 8798ff6fc1
54 changed files with 724 additions and 229 deletions
+5 -2
View File
@@ -7,7 +7,10 @@ import (
)
func TestRosterBuilder(t *testing.T) {
iq := NewIQ(Attrs{Type: IQTypeResult, From: "romeo@montague.net/orchard"})
iq, err := NewIQ(Attrs{Type: IQTypeResult, From: "romeo@montague.net/orchard"})
if err != nil {
t.Fatalf("failed to create IQ: %v", err)
}
var noGroup []string
iq.RosterItems().AddItem("xl8ceawrfu8zdneomw1h6h28d@crypho.com",
@@ -91,7 +94,7 @@ func TestRosterBuilder(t *testing.T) {
}
}
func checkMarshalling(t *testing.T, iq IQ) (*IQ, error) {
func checkMarshalling(t *testing.T, iq *IQ) (*IQ, error) {
// Marshall
data, err := xml.Marshal(iq)
if err != nil {