n8n-community-node / n8n-nodes-mastodon

MIT License
17 stars 4 forks source link

[Feature suggestions] Languages Selection #5

Open benborges opened 1 year ago

benborges commented 1 year ago

Mastodon allows to specify the language of toots, so that people can choose which language they can see on their timeline.

Currently, if this node is connected to an account, the only way to set the language of the toot is in the account itself, but then if you programmatically toot something say in French, the metadata will still list it as the default language selected by the account.

Would it be possible to add a language selector so that we can define which language the toots are going to be sent with ?

ETdoFresh commented 1 year ago

Alright, I've added this blindly without any testing, haha 😛 ... please give it a test for me. You should be able to update to v0.0.4. I had to however restart my n8n instance before it showed up. But I do see it like the following. If it's fixed. Please close the issue. image https://github.com/n8n-community-node/n8n-nodes-mastodon/commit/d1087cbe12817f7dbf09e72e9889a67d1d0f4b58

benborges commented 1 year ago

ohh i missed your reply!! going to test now !

benborges commented 1 year ago

Hmm I'm not sure it's setting the language type properly to the individual toot, I do see that a huge list of languages comes in the view-source: of the toot itself and compared to other toots, I'm not sure this is normal, usually, only one language should be set so

I think a drop-down that would set the proper language instead of a free form field would solve the problem ?

currently it's as if ALL the list of languages is being sent :/

benborges commented 1 year ago

Maybe I'm missing something and i'm not able to use this properly, can you confirm that typing the language name in the field is enough to define the language ?

jakevis commented 1 year ago

So I dont think the a drop down is doable - but we can probably add a note around what to put there. It is expecting a ISO 639 language code (2 char).

https://docs.joinmastodon.org/methods/statuses/#form-data-parameters-1

https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

@benborges can you verify that its working for you with a 2 char code in there? - it is with English for me.

benborges commented 1 year ago

I set En or Fr in the field, but then on the JSON view of the toot I could see literally the entire list of languages added to the toot, instead of just defining one, I got confused to see all that.. So I'm gonna try again tomorrow and see how it goes. Thanks a lot!

jakevis commented 1 year ago

I set En or Fr in the field, but then on the JSON view of the toot I could see literally the entire list of languages added to the toot, instead of just defining one, I got confused to see all that.. So I'm gonna try again tomorrow and see how it goes. Thanks a lot!

Any luck on testing?

rmdes commented 1 year ago

It's working, but until the loggerProxy error is fixed, this not is not usable with current N8N versions :/