[Enhancement]: More complete message rendering
Speedy native Discord client for macOS built in Swift
Brought to you by:
cryptoalgo
Originally created by: Im-Fran
Render @mentions as the official client does.
Mentions are shown as raw text, in the form <@user id>
Mentions should be rendered with the user name of the mentioned user, e.g. @CryptoAlgo Team
Here is a ping from someone else to me, is not shown as @Fran
but as raw text with my user id
Originally posted by: cryptoAlgorithm
This is not a bug, all mentions aren't parsed yet. Obviously, this is something I'd like to change, but swiftUI makes it particularly hard with its extremely restricted AttributedString. Our contributors and I have attempted to add rendering for emotes and mentions but got nowhere.
Originally posted by: Im-Fran
I could try to fix it, but I would need time to look at the code and understand on how the text is parsed. Also it might not be a good work cuz I just started learning SwiftUI xD
Originally posted by: Im-Fran
But the project does have like a parser for the discord markdown, right? Isn't it possible to add another parser to that package? that also can parse pings?
Originally posted by: cryptoAlgorithm
@Im-Fran nope, the md parsing is done by
Text
itself. it's a closed implementation with no way to extend it, unfortunately. Ahhh, apple thinking they know best againOriginally posted by: cryptoAlgorithm
Do join the Discord server to reach me faster :)