Skip to content

Commit

Permalink
Remove default success message; shorten mastodon success; add X success
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Jan 9, 2024
1 parent ea454aa commit 7a10f04
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/wp-to-twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ function wpt_post_submit_handler( $connection, $response, $id, $auth, $twit ) {
if ( ! $has_status_id && $status_id ) {
update_post_meta( $id, '_wpt_status_id', $status_id );
}
wpt_set_log( 'wpt_status_message', $id, $notice . ' ' . __( 'Status sent successfully.', 'wp-to-twitter' ) );
wpt_set_log( 'wpt_status_message', $id, $notice );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/wpt-post-to-mastodon.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function wpt_send_post_to_mastodon( $connection, $auth, $id, $status ) {
$success = true;
$http_code = 200;
$status_id = $return['id'];
$notice .= __( 'Successful status update sent to Mastodon.', 'wp-to-twitter' );
$notice .= __( 'Sent to Mastodon.', 'wp-to-twitter' );
} else {
$http_code = 401;
$notice .= __( 'Mastodon status update failed.', 'wp-to-twitter' );
Expand Down
1 change: 1 addition & 0 deletions src/wpt-post-to-twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ function wpt_send_post_to_twitter( $connection, $auth, $id, $status ) {
'rate-24' => $headers['x-app-limit-24hour-limit'],
'rate-24-reset' => $headers['x-app-limit-24hour-reset'],
);
$notice = __( 'Sent to X.com', 'wp-to-twitter' );
update_option( 'wpt_app_limit', $rate_limit );
} catch ( RequestException $e ) {
// Get Guzzle exception response.
Expand Down

0 comments on commit 7a10f04

Please sign in to comment.