Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: JSON-like objects for message content #8

Open
1 task done
5GameMaker opened this issue Aug 30, 2023 · 0 comments
Open
1 task done

feat: JSON-like objects for message content #8

5GameMaker opened this issue Aug 30, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@5GameMaker
Copy link
Member

Area

Protolok

Problem

As can be seen with Discord, whenever a new formatting feature gets added (or removed, see replies), new formatting rules are getting applied on old messages, including where such formatting was not intended. In addition, sometimes people want to use some of the special characters without them being transformed into a style or use special symbols within the style, which can get tricky to get working.

Suggested solution

Replacing plaintext markdown with a JSON-like structure allows message formatting to persist throughout all updates of the app unchanged as well as allow us to add new features without updating protocol version (not that message formatting is something you'd be changing often anyway). Users do not like updating their apps and often keep old version for as long as they can, and the JSON-like structure (if done properly) is perfectly backwards-compatible as unsupported fields can be safely ignored, resulting in missing formatting at best.

Alternatives

Binary format[TM]
What even is a binary format, anyway?

  • Binary JSON
    This is literally the same thing, just expressed a bit differently.
  • Not quite JSON, but a similar thing
    If there's a more efficient format than JSON, go ahead. I'm talking about a structure, not format.
  • postcard-like binary format
    Problem with postcard and similar things is that they are neither forwards- nor backwards- compatible, thus we'd need to upgrade protocol version every time we add a message formatting feature and keep support for every single app version just to keep formatting working. Such trivial thing as adding a bit more formatting options should not require new protocol versions.

Additional information

No response

Checks

  • I have checked for existing issues about this, and did not
    find any.
@5GameMaker 5GameMaker added the enhancement New feature or request label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant