@@ 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()