Maybe fixed poll notifications code. Only time will tell.

This commit is contained in:
Storm Dragon
2025-08-02 20:54:43 -04:00
parent 9933a8e6a0
commit df39473519
+3 -1
View File
@@ -1408,7 +1408,7 @@ $dmmarkread = 1 if (!defined $dmmarkread); # Default to enabled
$notificationpause = 6 if (!defined $notificationpause); # NOT ||= ... zero is a VALID value! $notificationpause = 6 if (!defined $notificationpause); # NOT ||= ... zero is a VALID value!
$notificationpause = 0 if ($anonymous); $notificationpause = 0 if ($anonymous);
$notificationpause = 0 if ($pause eq '0'); $notificationpause = 0 if ($pause eq '0');
$notifies ||= 'boost,favourite,favorite'; # Default notification types for sound alerts (both spellings) $notifies ||= 'boost,favourite,favorite,poll'; # Default notification types for sound alerts (both spellings)
$ansi = ($noansi) ? 0 : $ansi = ($noansi) ? 0 :
(($ansi || $ENV{'TERM'} eq 'ansi' || $ENV{'TERM'} eq 'xterm-color') (($ansi || $ENV{'TERM'} eq 'ansi' || $ENV{'TERM'} eq 'xterm-color')
? 1 : 0); ? 1 : 0);
@@ -6623,6 +6623,7 @@ sub notifications_tdisplay {
$sound_class = 'boost' if ($type eq 'reblog'); $sound_class = 'boost' if ($type eq 'reblog');
$sound_class = 'favourite' if ($type eq 'favourite' || $type eq 'favorite'); $sound_class = 'favourite' if ($type eq 'favourite' || $type eq 'favorite');
$sound_class = 'follow' if ($type eq 'follow'); $sound_class = 'follow' if ($type eq 'follow');
$sound_class = 'poll' if ($type eq 'poll');
# Process as individual post with proper class # Process as individual post with proper class
&$handle($notification, $sound_class); &$handle($notification, $sound_class);
@@ -7161,6 +7162,7 @@ sub notificationrefresh {
$sound_class = 'boost' if ($type eq 'reblog'); $sound_class = 'boost' if ($type eq 'reblog');
$sound_class = 'favourite' if ($type eq 'favourite' || $type eq 'favorite'); $sound_class = 'favourite' if ($type eq 'favourite' || $type eq 'favorite');
$sound_class = 'follow' if ($type eq 'follow'); $sound_class = 'follow' if ($type eq 'follow');
$sound_class = 'poll' if ($type eq 'poll');
# Always debug notification types to help troubleshoot # Always debug notification types to help troubleshoot
print $stdout "-- DEBUG: Received notification type='$type', mapped to sound_class='$sound_class'\n" if ($verbose || $type eq 'favourite'); print $stdout "-- DEBUG: Received notification type='$type', mapped to sound_class='$sound_class'\n" if ($verbose || $type eq 'favourite');