Skip to content
This repository was archived by the owner on Sep 14, 2023. It is now read-only.

Include location data sent to Bot - #47

Open
Schwad wants to merge 2 commits into
eljojo:masterfrom
Schwad:master
Open

Include location data sent to Bot#47
Schwad wants to merge 2 commits into
eljojo:masterfrom
Schwad:master

Conversation

@Schwad

@Schwad Schwad commented Aug 10, 2018

Copy link
Copy Markdown
Collaborator

This PR includes locations sharing from the user to the bot.

The workflow: when clicking Send my current location a new message
is sent to the bot with latitude and longitude accessed via
my_message.location.

To get the coordinates in an array, use my_message.location.full.

Original api discussion here.

This PR does not implement sharing of live locations, which are
implemented in a wholly different manner by nesting
the information within edited_message. To include live locations we
would also need to bring in the edited_message functionality. I will
be approaching this with my next PR.

This PR includes locations sharing from the user to the bot.

The workflow is when clicking 'Send my current location' a new message
is sent to the bot with latitude and longitude accessed via
`my_message.location`. To get the coordinates in an array, this can
be accessed via `my_message.location.full`. Original api discussion
[here](https://core.telegram.org/bots/api#location).

This PR does *not* implement sharing of live locations, which are
[implemented in a wholly different manner](https://telegram.org/blog/live-locations) by nesting
the information within `edited_message`. To include live locations we
would also need to bring in the `edited_message` functionality. I will
be approaching this with my next PR.
@Schwad
Schwad requested a review from eljojo August 10, 2018 15:09
@Schwad

Schwad commented Aug 13, 2018

Copy link
Copy Markdown
Collaborator Author

Commit incoming for spec passing :)

@Schwad

Schwad commented Sep 1, 2018

Copy link
Copy Markdown
Collaborator Author

@eljojo Quick question:

On travis it's trying to make the following request: https://api.telegram.org/bot/getMe as you can see here: https://travis-ci.org/eljojo/telegram_bot/jobs/423356555

But of course we want this request to grab the VCR cassette: https://api.telegram.org/botTEST_BOT_API_TOKEN/getMe (with the env whitewashing)... And it seems to have gone green on your push.

What am I missing here to get the ENV variables in travis triggering? :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant