~edwargix/axon

baabf144631bf0292852882035ac2a700208d7a4 — David Florness 3 years ago 8d72820
autojoin: better var name
1 files changed, 3 insertions(+), 3 deletions(-)

M autojoin/cmd.go
M autojoin/cmd.go => autojoin/cmd.go +3 -3
@@ 23,12 23,12 @@ func init() {
}

func autojoin() error {
	data, err := shared.GetAuthInfo()
	authInfo, err := shared.GetAuthInfo()
	if err != nil {
		return err
	}

	client, err := mautrix.NewClient(data.Homeserver, data.UserID, data.AccessToken)
	client, err := mautrix.NewClient(authInfo.Homeserver, authInfo.UserID, authInfo.AccessToken)
	if err != nil {
		return err
	}


@@ 38,7 38,7 @@ func autojoin() error {
	syncer.OnEventType(event.StateMember, func(_ mautrix.EventSource, event *event.Event) {
		// skip non-member events and member events that don't pertain
		// to us
		if *event.StateKey != data.UserID.String() || event.Type.Type != "m.room.member" {
		if *event.StateKey != authInfo.UserID.String() || event.Type.Type != "m.room.member" {
			return
		}
		content := event.Content.AsMember()