Skip to content

Commit

Permalink
restore vestigial post_id names
Browse files Browse the repository at this point in the history
  • Loading branch information
antonizoon committed Apr 30, 2019
1 parent c3ad322 commit eca9196
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

3 changes: 2 additions & 1 deletion py8chan/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def is_op(self):
@property
def post_id(self):
return self._data.get('no')
number = num = no = post_number = post_id # allows post_id to exist as multiple different names

@property
def resto(self):
Expand Down Expand Up @@ -156,7 +157,7 @@ def __repr__(self):
return '<Post /%s/%i#%i, has_file: %r, has_extra_files: %r>' % (
self._thread._board.name,
self._thread.id,
self.post_number,
self.post_id,
self.has_file,
self.has_extra_files
)
4 changes: 2 additions & 2 deletions py8chan/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def _from_json(cls, json, board, id=None):

if id is not None:
if not t.replies:
t.last_reply_id = t.topic.post_number
t.last_reply_id = t.topic.post_id
else:
t.last_reply_id = t.replies[-1].post_number
t.last_reply_id = t.replies[-1].post_id

else:
t.want_update = True
Expand Down

0 comments on commit eca9196

Please sign in to comment.