logo

ap-client

CLI-based client / toolbox for ActivityPub Client-to-Servergit clone https://hacktivis.me/git/ap-client.git
commit: 2434c51e2fef21dae46eafb047a855a7a21d067c
parent c12d170689dbc2ca54550a3322ef2105d0086a1d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 14 Aug 2021 11:17:14 +0200

ap-backup.pl: Fix fetching first page of outbox

Diffstat:

Map-backup.pl11++---------
1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/ap-backup.pl b/ap-backup.pl @@ -6,7 +6,6 @@ use strict; use utf8; no warnings; # Wide Character… -use Scalar::Util qw(reftype); use Getopt::Std; use LWP::UserAgent; use MIME::Base64; @@ -60,14 +59,8 @@ sub apc2s_backup { die "“first” property of OrderedCollection undefined"; } - my $ref_type = reftype($response->{"first"}); - - if($ref_type eq 'STRING') { - print "Fetching first property: ", $response->{"first"}, "\n"; - apc2s_backup($response->{"first"}); - } else { - die "Type ", $ref_type, "for “first” property is unsupported"; - } + print "Fetching first property: ", $response->{"first"}, "\n"; + apc2s_backup($response->{"first"}); } elsif($response->{"type"} eq "OrderedCollectionPage") { if($response->{"orderedItems"}) { save_collection($response->{"orderedItems"});