Skip to content
Snippets Groups Projects
Commit ead36df8 authored by roadscape's avatar roadscape
Browse files

fix reblog date

parent 89ac82de
No related branches found
No related tags found
No related merge requests found
......@@ -163,6 +163,7 @@ class Posts:
if not DbState.is_initial_sync():
CachedPost.delete(pid, op['author'], op['permlink'])
if depth == 0:
# TODO: delete from hive_reblogs -- otherwise feed cache gets populated with deleted posts somwrimas
FeedCache.delete(pid)
else:
# force parent child recount when child is deleted
......
......@@ -385,11 +385,11 @@ async def _get_blog(db, account: str, start_index: int, limit: int = None):
idx = int(start_index)
for post in await load_posts(db, ids):
reblog = post['author'] != account
reblog_on = post['created'] if reblog else "1970-01-01T00"
reblog_on = post['created'] if reblog else "1970-01-01T00:00:00"
out.append({"blog": account,
"entry_id": idx,
"comment": post,
"reblog_on": reblog_on})
"reblogged_on": reblog_on})
idx -= 1
return out
......@@ -27,6 +27,7 @@ setup(
setup_requires=['pytest-runner'],
tests_require=tests_require,
install_requires=[
#'aiopg==0.16.0',
'aiopg @ https://github.com/aio-libs/aiopg/tarball/862fff97e4ae465333451a4af2a838bfaa3dd0bc',
'jsonrpcserver==4.0.1',
'aiohttp',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment