perlsky is a Perl 5 implementation of an AT Protocol Personal Data Server.
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

Share label event constants

alice 7a59811c 20c8fbfc

+5 -2
+3 -2
lib/ATProto/PDS/API/Misc.pm
··· 15 15 use ATProto::PDS::Constants qw( 16 16 ACTION_TOKEN_PLC_OPERATION 17 17 EVENT_TYPE_IDENTITY 18 + EVENT_TYPE_LABEL 18 19 TOKEN_AUD_ACCESS 19 20 ); 20 21 use ATProto::PDS::EventStream qw(encode_message_frame); ··· 215 216 ); 216 217 return unless defined $next_seq; 217 218 pump_event_subscription($c, $next_seq, sub ($event) { 218 - return unless ($event->{type} // q()) eq 'label'; 219 + return unless ($event->{type} // q()) eq EVENT_TYPE_LABEL; 219 220 my $labels = $event->{payload}{labels} || []; 220 221 return unless @$labels; 221 222 return ( ··· 223 224 seq => 0 + $event->{seq}, 224 225 labels => $labels, 225 226 }), 226 - 'label', 227 + EVENT_TYPE_LABEL, 227 228 ); 228 229 }); 229 230 return;
+2
lib/ATProto/PDS/Constants.pm
··· 14 14 EVENT_TYPE_ACCOUNT 15 15 EVENT_TYPE_COMMIT 16 16 EVENT_TYPE_IDENTITY 17 + EVENT_TYPE_LABEL 17 18 EVENT_TYPE_SYNC 18 19 SERVICE_ID_BSKY_APPVIEW 19 20 SERVICE_ID_BSKY_CHAT ··· 36 37 use constant EVENT_TYPE_COMMIT => 'commit'; 37 38 use constant EVENT_TYPE_IDENTITY => 'identity'; 38 39 use constant EVENT_TYPE_ACCOUNT => 'account'; 40 + use constant EVENT_TYPE_LABEL => 'label'; 39 41 use constant EVENT_TYPE_SYNC => 'sync'; 40 42 41 43 use constant SERVICE_ID_BSKY_APPVIEW => 'bsky_appview';