~samwhited/xmpp

c386bc5cd283e80890222f6e8f1d81ddfdd91d68 — Sam Whited 1 year, 7 months ago 42b166f
examples/echobot: bump to latest API
3 files changed, 5 insertions(+), 5 deletions(-)

M examples/echobot/echo.go
M examples/echobot/go.mod
M examples/echobot/go.sum
M examples/echobot/echo.go => examples/echobot/echo.go +2 -2
@@ 57,7 57,7 @@ func echo(addr, pass string, xmlIn, xmlOut io.Writer, logger, debug *log.Logger)
	}()

	// Send initial presence to let the server know we want to receive messages.
	_, err = s.Send(context.TODO(), stanza.WrapPresence(nil, stanza.AvailablePresence, nil))
	err = s.Send(context.TODO(), stanza.WrapPresence(jid.JID{}, stanza.AvailablePresence, nil))
	if err != nil {
		return fmt.Errorf("Error sending initial presence: %w", err)
	}


@@ 95,7 95,7 @@ func echo(addr, pass string, xmlIn, xmlOut io.Writer, logger, debug *log.Logger)
			}), xml.StartElement{Name: xml.Name{Local: "body"}}),
		)
		debug.Printf("Replying to message %q from %s with body %q", msg.ID, msg.From.Bare(), msg.Body)
		_, err = s.Send(context.TODO(), reply)
		err = s.Send(context.TODO(), reply)
		if err != nil {
			logger.Printf("Error responding to message %q: %q", msg.ID, err)
		}

M examples/echobot/go.mod => examples/echobot/go.mod +1 -1
@@ 4,7 4,7 @@ go 1.13

require (
	mellium.im/sasl v0.2.1
	mellium.im/xmlstream v0.13.2
	mellium.im/xmlstream v0.13.3
	mellium.im/xmpp v0.9.0
)


M examples/echobot/go.sum => examples/echobot/go.sum +2 -2
@@ 17,5 17,5 @@ mellium.im/reader v0.1.0 h1:UUEMev16gdvaxxZC7fC08j7IzuDKh310nB6BlwnxTww=
mellium.im/reader v0.1.0/go.mod h1:F+X5HXpkIfJ9EE1zHQG9lM/hO946iYAmU7xjg5dsQHI=
mellium.im/sasl v0.2.1 h1:nspKSRg7/SyO0cRGY71OkfHab8tf9kCts6a6oTDut0w=
mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ=
mellium.im/xmlstream v0.13.2 h1:7H+1DrCGeqA494FXz0s0glZ4Y0hK/yfvdVfEUyG+Um8=
mellium.im/xmlstream v0.13.2/go.mod h1:n9o+Vjw+o977AcxnRnb+5dKfzniGZV4DSQKgQLNYWaU=
mellium.im/xmlstream v0.13.3 h1:tc2HN6gNIBbpB/uTgxZgw7QV+GNkSI8dSfpruJOBf9I=
mellium.im/xmlstream v0.13.3/go.mod h1:n9o+Vjw+o977AcxnRnb+5dKfzniGZV4DSQKgQLNYWaU=