Skip to content

Commit f365fda

Browse files
committed
Fxied incorrect parameters
1 parent 0a0cbc2 commit f365fda

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Slack.Backup/Private/backup/Invoke-ChannelBackup.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

Slack.Backup/Private/backup/Invoke-ChannelsBackup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)