Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update location broken? #239

Closed
rengglian opened this issue Dec 21, 2019 · 2 comments
Closed

Update location broken? #239

rengglian opened this issue Dec 21, 2019 · 2 comments
Labels
Milestone

Comments

@rengglian
Copy link

I have trouble updating the live location of my bot.
Send text and send location work as expected.

	go func() {
		var _tempMessage = &tb.Message{}
		for _botResponse := range botResponse {
			fmt.Println("AutoResponse")
			switch _botResponse.Reply {
			case "text":
				bot.Send(chatGroup, _botResponse.Msg.Text)
			case "location":
				_tempMessage, _ = bot.Send(chatGroup, _botResponse.Msg.Location)
			case "updateLocation":
				fmt.Println(_tempMessage.MessageSig())
				fmt.Println(tb.Location{Lat: _botResponse.Lat, Lng: _botResponse.Lng})
				bot.Edit(_tempMessage, tb.Location{Lat: _botResponse.Lat, Lng: _botResponse.Lng})
			default:
			}
		}
	}()

The console output shows the correct message and chat id.

Any ideas what is wrong?
If you need more information let me know

@demget
Copy link
Collaborator

demget commented Mar 29, 2020

Hm.. Seems like it's a bug. I will extend Edit with editMessageLiveLocation method in v2.1.

@demget demget added the bug label Mar 29, 2020
@demget demget added this to the v2.1 milestone Apr 6, 2020
@demget
Copy link
Collaborator

demget commented Apr 16, 2020

Fixed in 4e2f28c of develop branch

@demget demget added the ready label Apr 16, 2020
@demget demget closed this as completed Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants