Open 4k1k0 opened 4 years ago
I've done it in my fork: https://git.mentality.rip/FWGS/Husky
I'm probably not gonna send a PR to upstream, the fork is Pleroma oriented where is upstream is more about Mastodon.
I think this should be handled on the server side - for example, glitch-soc
supports markdown, and as long as you set it as the default post "encoding" in the web app, then markdown posts made using Tusky are marked up correctly
Thank you very much @a1batross I will check it out asap.
Also, thanks for the information @Tak
:heart:
Hi, since some Pleroma users won’t use Husky due to his maintener, and a good amount of glitch-soc users use Tusky. Please, could you consider this feature-request to enhance our Tusky’s experience ? It would be great to have the main functions we love on our servers in our client.
Thanks for considerating ♥
I think this should be handled on the server side - for example,
glitch-soc
supports markdown, and as long as you set it as the default post "encoding" in the web app, then markdown posts made using Tusky are marked up correctly
That works for Mastodon and its forks but not for Pleroma.
Tusky would need to detect that the account is on a Pleroma instance :
A Pleroma instance can be identified by " (compatible; Pleroma )" present in version field in response from
/api/v1/instance
And then add a button to toggle the content-type between text/plain
and text/markdown
Or add an options somewhere to enable « forks features » and « pleroma features »
Soapbox uses feature flags based on backend detection maybe Tusky could do something like this ? :
export const getFeatures = createSelector([
instance => parseVersion(instance.get('version')),
instance => instance.getIn(['pleroma', 'metadata', 'features'], ImmutableList()),
instance => instance.getIn(['pleroma', 'metadata', 'federation'], ImmutableMap()),
], (v, features, federation) => {
return {
suggestions: v.software === 'Mastodon' && gte(v.compatVersion, '2.4.3'),
trends: v.software === 'Mastodon' && gte(v.compatVersion, '3.0.0'),
emojiReacts: v.software === 'Pleroma' && gte(v.version, '2.0.0'),
emojiReactsRGI: v.software === 'Pleroma' && gte(v.version, '2.2.49'),
attachmentLimit: v.software === 'Pleroma' ? Infinity : 4,
focalPoint: v.software === 'Mastodon' && gte(v.compatVersion, '2.3.0'),
importMutes: v.software === 'Pleroma' && gte(v.version, '2.2.0'),
emailList: features.includes('email_list'),
chats: v.software === 'Pleroma' && gte(v.version, '2.1.0'),
scopes: v.software === 'Pleroma' ? 'read write follow push admin' : 'read write follow push',
federating: federation.get('enabled', true), // Assume true unless explicitly false
richText: v.software === 'Pleroma',
securityAPI: v.software === 'Pleroma',
settingsStore: v.software === 'Pleroma',
accountAliasesAPI: v.software === 'Pleroma',
};
});
export const parseVersion = version => {
const regex = /^([\w\.]*)(?: \(compatible; ([\w]*) (.*)\))?$/;
const match = regex.exec(version);
return {
software: match[2] || 'Mastodon',
version: match[3] || match[1],
compatVersion: match[1],
};
};
Note to self: When testing Markdown rendering, https://mastodon.social/@mia@front-end.social/109633923902216245 is a good status to use.
…this post is not marked up, because mastodon.social doesn't support markdown (nor other markup methods)
Mastodon has supported it but not released. https://github.com/mastodon/mastodon/commit/3a6451c867595fd58998ee1706589b15a69d993b
Is there any news about this feature request in the meantime?
Hello. It would be nice to have Markdown support like pleroma web app does.
Here are two examples:
It would be cool if you can add a Markdown option for your post.
Here I'm using the web app
And this is how the toots looks like. The one from 5s ago is the one I wrote from Tusky without Markdown support and the one from 1m ago was written from the web app with Markdown support enabled.
Thank you :heart:
Tusky Version: 11.0
Android Version: 9
Android Device: Xiaomi Redmi Note 8
Mastodon instance (if applicable): lets.bemoe.online (it's a pleroma instance)
[X] I searched or browsed the repo’s other issues to ensure this is not a duplicate.