Changed rtsof to boostsof, the command should actually work now.

This commit is contained in:
Storm Dragon
2025-08-11 03:14:44 -04:00
parent 953691d079
commit 3994cd2f46
+15 -12
View File
@@ -147,7 +147,7 @@ BEGIN {
# dmpause=0 # DM refresh rate (0=use main pause)
# === NOTIFICATIONS ===
# notificationpause=0 # Notification refresh rate (0=use main pause)
# notificationpause=2 # Notification refresh rate (0=every cycle, 2=default)
# === INTERACTION ===
# mentions=0 # Legacy flag (mentions included automatically)
@@ -691,7 +691,7 @@ if ($termrl && $termrl->ReadLine eq 'Term::ReadLine::Gnu') {
/listfriends /followers /following /dump /du /eval /ev
/version /update /versioncheck /updatecheck
/thread /th /entities /ent /delete
/deletelast /rtsof /vote /whois /w /me
/deletelast /boostsof /rtsof /vote /whois /w /me
);
} else {
# Dynamic extraction from source code
@@ -1328,8 +1328,8 @@ $idurl ||= "${apibase}/statuses/%I";
$delurl ||= "${apibase}/statuses/%I";
$reblogurl ||= "${apibase}/statuses/%I/reblog";
$boostsbyurl ||= "${apibase}/statuses/%I/reblogged_by";
# Twitter endpoints removed - not available in fediverse
# $boostsbyurl: Use /api/v1/statuses/%I/reblogged_by instead
# $boostsofmeurl: No direct equivalent in fediverse (privacy feature)
$wurl ||= "${apibase}/accounts/%I";
@@ -1409,7 +1409,7 @@ $dmpause = 4 if (!defined $dmpause); # NOT ||= ... zero is a VALID value!
$dmpause = 0 if ($anonymous);
$dmpause = 0 if ($pause eq '0');
$dmmarkread = 1 if (!defined $dmmarkread); # Default to enabled
$notificationpause = 6 if (!defined $notificationpause); # NOT ||= ... zero is a VALID value!
$notificationpause = 2 if (!defined $notificationpause); # NOT ||= ... zero is a VALID value!
$notificationpause = 0 if ($anonymous);
$notificationpause = 0 if ($pause eq '0');
$notifies ||= 'boost,favourite,favorite'; # Default notification types for sound alerts (both spellings)
@@ -3933,8 +3933,7 @@ m#^/(un)?f(boost|a|av|ave|avorite|avourite)? ([zZ]?[a-zA-Z]?[0-9]+)$#) {
if ($post->{'reblog'}->{'id_str'});
print $stdout "-- status boosted\n"
unless(&updatest($text, 1, 0, undef,
$post->{'reblog'}->{'id_str'}
|| $post->{'id_str'}));
$post->{'id_str'}));
return 0;
}
# we can't or user requested /ert /ort
@@ -3953,11 +3952,11 @@ m#^/(un)?f(boost|a|av|ave|avorite|avourite)? ([zZ]?[a-zA-Z]?[0-9]+)$#) {
goto POSTPRINT; # fugly! FUGLY!
}
if (m#^/(re)?rts?of?me?(\s+\+\d+)?$# && !$noreblogs) {
if (m#^/(re)?(boosts|rts?)of?me?(\s+\+\d+)?$# && !$noreblogs) {
#TODO
# when more fields are added, integrate them over the JSON_ref
my $mode = $1;
my $countmaybe = $2;
my $countmaybe = $3;
$countmaybe =~ s/[^\d]//g if (length($countmaybe));
$countmaybe += 0;
@@ -3965,8 +3964,8 @@ m#^/(un)?f(boost|a|av|ave|avorite|avourite)? ([zZ]?[a-zA-Z]?[0-9]+)$#) {
print $stdout "-- Sorry, fediverse doesn't provide 'reposts of me' (privacy feature)\n";
return 0;
}
if (m#^/rts?of\s+([zZ]?[a-zA-Z]?[0-9]+)$# && !$noreblogs) {
my $code = lc($1);
if (m#^/(boosts|rts?)of\s+([zZ]?[a-zA-Z]?[0-9]+)$# && !$noreblogs) {
my $code = lc($2);
my $post = &get_post($code);
my $id;
@@ -8318,11 +8317,15 @@ sub sendnotifies { # this is a default subroutine of a sort, right?
my $notify_enabled = $notify_list{$class} ? 'YES' : 'NO';
print $stdout "-- DEBUG: notify_list{$class} = $notify_enabled\n" if ($verbose);
# Special debug for favorite notifications
# Special debug for favorite and mention notifications
if ($class eq 'favourite' || $class eq 'favorite') {
print $stdout "-- DEBUG: FAVORITE NOTIFICATION - class='$class', enabled=$notify_enabled, initial_load=$initial_load_in_progress\n";
print $stdout "-- DEBUG: notify_list keys: " . join(',', keys %notify_list) . "\n";
}
if ($class eq 'mention') {
print $stdout "-- DEBUG: MENTION NOTIFICATION - class='$class', enabled=$notify_enabled, initial_load=$initial_load_in_progress\n";
print $stdout "-- DEBUG: notify_list keys: " . join(',', keys %notify_list) . "\n";
}
# Send notification if we have a valid class, it's enabled, AND initial load is complete
if (length($class) && $notify_list{$class} && !$initial_load_in_progress) {
@@ -8626,7 +8629,7 @@ sub defaultautocompletion {
'/reply', '/url', '/thread', '/repost', '/replyall',
'/replies', '/timelines', '/timeline', '/visibility', '/ruler', '/exit', '/me', '/vcheck',
'/orepost', '/erepost', '/frepost', '/liston',
'/listoff', '/dmsent', '/rtsof', '/rtson', '/rtsoff',
'/listoff', '/dmsent', '/boostsof', '/rtsof', '/rtson', '/rtsoff',
'/lists', '/withlist', '/add', '/padd', '/push',
'/pop', '/followers', '/following', '/friends', '/lfollow',
'/lleave', '/listfollowers', '/listfriends',