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

Add timestamp to telegram events #153

Merged
merged 3 commits into from
May 6, 2019
Merged

Add timestamp to telegram events #153

merged 3 commits into from
May 6, 2019

Conversation

rubiojr
Copy link
Collaborator

@rubiojr rubiojr commented May 13, 2017

Minor but useful thingie so we can use timestamps with action templates.

@@ -116,6 +117,11 @@ func (mod *TelegramBee) Run(eventChan chan bees.Event) {
Type: "string",
Value: strconv.Itoa(update.Message.From.ID),
},
{
Name: "timestamp",
Type: "string",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use unix timestamps here, we should treat the parameter as an integer as well. That being said, I think we actually wanna support handling timestamp as time.Time internally and let the conversion routine in placeholders.go do its magic (essentially make that support time.Time and let it convert from/to strings and integers).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

@rubiojr rubiojr force-pushed the timestamp-telegram-event branch from 04467ef to 196b3db Compare April 14, 2019 12:29
rubiojr added a commit to rubiojr/beehive that referenced this pull request Apr 14, 2019
@muesli
Copy link
Owner

muesli commented Apr 26, 2019

Now that you added a time format to Beehive, we could take another look at this!

@rubiojr rubiojr force-pushed the timestamp-telegram-event branch from 196b3db to 991e8d6 Compare May 6, 2019 16:13
@rubiojr rubiojr force-pushed the timestamp-telegram-event branch from 991e8d6 to 14d0c57 Compare May 6, 2019 16:16
@rubiojr
Copy link
Collaborator Author

rubiojr commented May 6, 2019

@muesli updated!

@muesli mentioned its internal Go type is separate to that type definition here,
which we mostly use for the admin interface.
@muesli muesli merged commit 440d55a into master May 6, 2019
@rubiojr rubiojr deleted the timestamp-telegram-event branch May 6, 2019 18:37
Mark-Jung pushed a commit to Mark-Jung/beehive that referenced this pull request May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants