mirror of
https://framagit.org/veretcle/scootaloo.git
synced 2025-07-20 17:11:19 +02:00
fix: copy the original lang from Twitter to Mastodon
This commit is contained in:
@@ -21,7 +21,6 @@ use state::{read_state, write_state, TweetToToot};
|
|||||||
|
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use html_escape::decode_html_entities;
|
use html_escape::decode_html_entities;
|
||||||
use isolang::Language;
|
|
||||||
use log::info;
|
use log::info;
|
||||||
use megalodon::{
|
use megalodon::{
|
||||||
megalodon::PostStatusInputOptions, megalodon::UpdateCredentialsInputOptions, Megalodon,
|
megalodon::PostStatusInputOptions, megalodon::UpdateCredentialsInputOptions, Megalodon,
|
||||||
@@ -204,9 +203,7 @@ pub async fn run(config: Config) {
|
|||||||
|
|
||||||
// language if any
|
// language if any
|
||||||
if let Some(l) = &tweet.lang {
|
if let Some(l) = &tweet.lang {
|
||||||
if let Some(r) = Language::from_639_1(l) {
|
post_status.language = Some(l.to_string());
|
||||||
post_status.language = Some(r.to_string());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// can be activated for test purposes
|
// can be activated for test purposes
|
||||||
|
Reference in New Issue
Block a user