Skip to content

Use datetime objects rather than milliseconds as a string#278

Closed
tcmal wants to merge 5 commits into
fbchat-dev:masterfrom
tcmal:master
Closed

Use datetime objects rather than milliseconds as a string#278
tcmal wants to merge 5 commits into
fbchat-dev:masterfrom
tcmal:master

Conversation

@tcmal
Copy link
Copy Markdown

@tcmal tcmal commented Apr 1, 2018

Fixes #277

Changes:

  • Message.timestamp is now a datetime object
  • Thread.last_message_timestamp is now a datetime object
  • before parameter of Client.fetchThreadMessages() & Client.fetchThreadList() is now a datetime object
  • Added utils.unix_time_millis and utils.millis_to_datetime

Copy link
Copy Markdown
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

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

These are breaking changes, so though I really like the idea (!), I'd like to postpone them until v.2.0.0. Thanks for the PR ;)

Comment thread fbchat/client.py
from .utils import *
from .models import *
from .graphql import *
import time
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

time is still being used in time.sleep, and neither datetime nor calendar is being used

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Message timestamps seem to be invalid.

2 participants