~samwhited/xmpp

c1743557be6c0df40bc371183b56e200e616de80 — Sam Whited 5 months ago 6399a7e
blocklist: fix missing error handling

Signed-off-by: Sam Whited <sam@samwhited.com>
1 files changed, 4 insertions(+), 1 deletions(-)

M blocklist/handler.go
M blocklist/handler.go => blocklist/handler.go +4 -1
@@ 47,13 47,16 @@ func (h Handler) HandleIQ(iq stanza.IQ, r xmlstream.TokenReadEncoder, start *xml
				close(c)
			}()
			for j := range c {
				xmlstream.Copy(r, xmlstream.Wrap(nil, xml.StartElement{
				_, err = xmlstream.Copy(r, xmlstream.Wrap(nil, xml.StartElement{
					Name: xml.Name{Space: NS, Local: "item"},
					Attr: []xml.Attr{{
						Name:  xml.Name{Local: "jid"},
						Value: j.String(),
					}},
				}))
				if err != nil {
					return err
				}
			}
		}
		// Copy the end payload and end IQ.