Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion slack_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def getHistory(pageableObject, channelId, pageSize = 100):
lastTimestamp = None

while(True):
sleep(1) # Respect the Slack API rate limit
response = pageableObject.history(
channel = channelId,
latest = lastTimestamp,
Expand All @@ -33,7 +34,6 @@ def getHistory(pageableObject, channelId, pageSize = 100):

if (response['has_more'] == True):
lastTimestamp = messages[-1]['ts'] # -1 means last element in a list
sleep(1) # Respect the Slack API rate limit
else:
break

Expand Down