~samwhited/xmpp

24885296fb8321a12f73b5ada7c9c6d1271f2c22 — Sam Whited 4 years ago 72556fe
ibr2: Always send a response
1 files changed, 9 insertions(+), 0 deletions(-)

M ibr2/ibr2.go
M ibr2/ibr2.go => ibr2/ibr2.go +9 -0
@@ 213,12 213,21 @@ func negotiateFunc(challenges ...Challenge) func(context.Context, *xmpp.Session,
				return
			}

			respStart := xml.StartElement{
				Name: xml.Name{Local: "response"},
			}
			if err = e.EncodeToken(respStart); err != nil {
				return
			}
			if c.Respond != nil {
				err = c.Respond(ctx, e)
				if err != nil {
					return
				}
			}
			if err = e.EncodeToken(respStart.End()); err != nil {
				return
			}

			break
		}