Initially hardcode 'public' tooting

Also tweaked to allow \n char in feed format string.

Nb. Toots defaulted to 'private' which means only subscribers would see
them. Ultimately this is better, but for purposes such as outreach, is
not so useful.

This feature should be editable per-feed.
The database and front end will need further attention for this.
develop
mj-saunders 2018-05-01 10:33:42 +00:00
parent 0bcad080ac
commit c367a6e39c
1 changed files with 11 additions and 1 deletions

View File

@ -93,6 +93,16 @@ FEED: foreach my $feed (@feeds){
$status =~ s/^(.{497}).*$/$1.../g;
}
$data{status} = $status;
# Visibility of a toot can be 'direct', 'private', 'unlisted' or 'public'
# 'direct' and 'unlisted' are irrelevant
# 'private' posts only to followers [default]
# 'public' posts to public timelines [ethical issue?]
# [* Should be set per feed in the sql db *]
# [* Hardcoded here temporarily for testing *]
my $visibility = 'public';
$data{visibility} = $visibility;
$ENV{status} = encode_json({%data});
# encode_json breaks '\n' chars - turns them into '\\n'
@ -106,7 +116,7 @@ FEED: foreach my $feed (@feeds){
$reply = <DATA>;
}
if ($VERBOSE) {$new_entries += 1;}
$new_entries += 1;
}
my %ne;