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

Support code blocks #62

Open
AnonC0DER opened this issue Dec 18, 2023 · 0 comments
Open

Support code blocks #62

AnonC0DER opened this issue Dec 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@AnonC0DER
Copy link

Overview

I would like to propose the implementation of code block support within the Matrix bridge. Currently, the absence of this feature makes it challenging to effectively communicate and share code-related information in Matrix conversations.

Feature Details

Currently the raw json updates that are from mautrix bridge looks like this :

{
  "message_id": 15948,
  "from": {
    "id": 12345,
    "is_bot": false,
    "first_name": "Someone",
    "username": "Someone",
    "language_code": "en"
  },
  "chat": {
    "id": 12345,
    "first_name": "Someone",
    "username": "Someone",
    "type": "private"
  },
  "date": 1702883382,
  "forward_from": {
    "id": 12345,
    "is_bot": false,
    "first_name": "Somebody",
    "username": "Somebody",
  },
  "forward_date": 1702883336,
  "text": "```bash\necho \"hello\"\n```"
}

After update it should be similar to this :

{
  "message_id": 15951,
  "from": {
    "id": 12345,
    "is_bot": false,
    "first_name": "Someone",
    "username": "Someone",
    "language_code": "en"
  },
  "chat": {
    "id": 12345,
    "first_name": "Someone",
    "username": "Someone",
    "type": "private"
  },
  "date": 1702883388,
  "forward_from": {
    "id": 12345,
    "is_bot": false,
    "first_name": "Someone",
    "username": "Someone",
    "language_code": "en"
  },
  "forward_date": 1702883342,
  "text": "echo \"hello\"",
  "entities": [
    {
      "offset": 0,
      "length": 12,
      "type": "pre",
      "language": "bash"
    }
  ]
}
@AnonC0DER AnonC0DER added the enhancement New feature or request label Dec 18, 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