File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Slack.Backup/Private/backup Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,14 @@ function Invoke-ChannelBackup {
2020 $start = $last.ts
2121 }
2222 Write-Verbose " Get-ChannelNewMessages [$ChannelId ][$ ( Convert-EpochToDate $Start ) ]"
23- [array ]$newMessages = Get-FullHistory - Token $key - ChannelId $ChannelId - Start $start
23+ [array ]$newMessages = Get-FullHistory - Token $Token - ChannelId $ChannelId - Start $start
2424
2525 $ids = $messages.client_msg_id
2626 $threadDeep = Convert-DateToEpoch (Get-Date ).AddDays(-90 )
2727 $threaded = $messages | ? { $_.reply_count -ne $null } | ? { [double ]$_.ts -le $start -and [double ]$_.ts -gt $threadDeep }
2828 $threaded | % {
2929 $om = $_
30- $response = Get-Thread - Token $key - ChannelId $ChannelId - ThreadTs $om.thread_ts
30+ $response = Get-Thread - Token $Token - ChannelId $ChannelId - ThreadTs $om.thread_ts
3131 if ($response.ok -eq $true ) {
3232 $replies = $response.messages
3333 $nm = $replies | Select-Object - First 1
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ function Invoke-ChannelsBackup {
1616 $channels | ConvertTo-Json - Depth 100 | Set-Content - Path " $backupLoc \channels.json"
1717
1818 $channels | % {
19- $channelBackupPath = " $backupRoot \channels\$ ( $_.id ) .json"
19+ $channelBackupPath = " $Location \channels\$ ( $_.id ) .json"
2020 Invoke-ChannelBackup - Token $Token - ChannelId $_.id - Location $channelBackupPath
2121 }
2222 }
You can’t perform that action at this time.
0 commit comments