Refactor complete for the most part, excluding any oopsies.

This commit is contained in:
Storm Dragon
2025-07-27 23:17:57 -04:00
parent 0d78ee671f
commit 367ad819ce
+33 -12
View File
@@ -2811,7 +2811,7 @@ Just type to talk!
Lists available timelines to view.
/timeline <name>
Switch to timeline (home, public, federated, notifications, etc.)
Switch to timeline (home, local, federated, notifications, etc.)
/visibility [level]
Show current post visibility or set to: public, unlisted, private, direct
@@ -2863,6 +2863,25 @@ EOF
&linein("PRESS RETURN/ENTER>");
print <<"EOF";
*** LISTS (FEDIVERSE PRIVACY-AWARE) ***
/lists - show your lists
/liston listname - add list to your timeline
/listoff listname - remove list from timeline
/again @me/listname - view posts from specific list
LIST MANAGEMENT:
/withlist listname create public - create new public list
/withlist listname create private - create new private list
/withlist listname delete - delete list (with confirmation)
/withlist listname add username - add user to list
/withlist listname delete username - remove user from list
/withlist listname desc "new description" - update description
/withlist listname name "new title" - rename list
FEDIVERSE PRIVACY: Lists respect ActivityPub privacy principles.
You can only access and manage your own lists (not other users' lists).
*** CONFIGURATION ***
Use /set to turn on options or set them at runtime.
@@ -2876,13 +2895,15 @@ see the documentation.
*** ABOUT TTYverse ***
TTYverse $TTYverse_VERSION - Fediverse client derived from TTYtter
Original TTYtter by Cameron Kaiser
TTYverse $TTYverse_VERSION - Command-line fediverse client
Fediverse-only client for Mastodon, Pleroma, GoToSocial and other ActivityPub servers
Derived from TTYtter by Cameron Kaiser
This software is offered AS IS, with no guarantees.
It is not endorsed by any fediverse server operators or developers.
Documentation: http://www.floodgap.com/software/ttytter/
Supports: Mastodon, Pleroma, GoToSocial, and other ActivityPub-compatible servers
Privacy-focused: Respects fediverse privacy principles (own lists only, etc.)
Suggestions: mention \@stormux\@social.stormux.org
EOF
@@ -7575,7 +7596,7 @@ sub get_post {
$w->{'tag'}->{'type'},
$w->{'tag'}->{'payload'},
$w->{'reblogs_count'},
$w->{'user'}->{'screen_name'}, $w->{'created_at'},
$w->{'user'}->{'username'}, $w->{'created_at'},
$l) = split(/\s/, $k, 17);
($w->{'source'}, $k) = split(/\|/, $l, 2);
$w->{'text'} = pack("H*", $k);
@@ -8715,7 +8736,7 @@ sub normalizejson {
# Set booster as the main user (who performed the boost action)
$boost_user = {
'screen_name' => $booster,
'username' => $booster,
'acct' => $booster
};
}
@@ -8964,13 +8985,13 @@ sub map_single_status {
$status->{'favorite_count'} = $status->{'favourites_count'} if exists($status->{'favourites_count'});
$status->{'in_reply_to_status_id_str'} = $status->{'in_reply_to_id'} if exists($status->{'in_reply_to_id'});
# User/Account field mappings
# User/Account field mappings - native fediverse fields preferred
if (exists($status->{'user'}) && ref($status->{'user'}) eq 'HASH') {
my $user = $status->{'user'};
$user->{'screen_name'} = $user->{'username'} if exists($user->{'username'});
# Map display fields only for compatibility with display functions
$user->{'name'} = $user->{'display_name'} if exists($user->{'display_name'});
$user->{'profile_image_url'} = $user->{'avatar'} if exists($user->{'avatar'});
# Keep acct field for full handle (username@domain.com)
# Native fediverse fields: username, acct (username@domain.com)
}
# Recursively map reblogged status - with depth limit to prevent infinite recursion
@@ -8985,14 +9006,14 @@ sub map_single_status {
sub map_user_object {
my $user = shift;
# Map Mastodon user fields to fediverse-compatible fields
$user->{'screen_name'} = $user->{'username'} if exists($user->{'username'});
# Map display-only fields for legacy compatibility
$user->{'name'} = $user->{'display_name'} if exists($user->{'display_name'});
$user->{'profile_image_url'} = $user->{'avatar'} if exists($user->{'avatar'});
# Keep acct field for full handle (username@domain.com)
# Count fields use native names already
$user->{'followers_count'} = $user->{'followers_count'} if exists($user->{'followers_count'});
$user->{'friends_count'} = $user->{'following_count'} if exists($user->{'following_count'});
$user->{'statuses_count'} = $user->{'statuses_count'} if exists($user->{'statuses_count'});
# Use native fediverse username/acct fields directly
return $user;
}