Skip to content

Commit

Permalink
fix #53
Browse files Browse the repository at this point in the history
  • Loading branch information
aahnik committed Jun 2, 2021
1 parent b21b048 commit 50ff89d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tgcf/past.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ async def forward_job() -> None:
async for message in client.iter_messages(
forward.source, reverse=True, offset_id=forward.offset
):
if forward.end and last_id > forward.end:
continue
if isinstance(message, MessageService):
continue
try:
Expand All @@ -36,7 +38,7 @@ async def forward_job() -> None:
for destination in forward.dest:
await send_message(destination, tm)
tm.clear()
last_id = str(message.id)
last_id = message.id
logging.info(f"forwarding message with id = {last_id}")
forward.offset = last_id
write_config(CONFIG)
Expand Down

0 comments on commit 50ff89d

Please sign in to comment.