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

Quoted replies generated by Discord bots are not shown correctly (the reply is quoted as well) #104

Open
wapsi opened this issue Jul 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@wapsi
Copy link

wapsi commented Jul 13, 2023

If bot in Discord uses quoting when replying to some message, the whole message (including the reply to the quoted message) will shown as quoted in Matrix (Element).

Here is a sample screenshot how the message is seen in the official Discord chat:

image

That message is shown in Element like this:

image

So, as you can see, the reply is just embedded into that quoteblock element too.

I checked by using the Firefox inspection tool that the HTML code and elements are like this in that message:

<a href="xxx" aria-label="10:29">
  <span class="mx_MessageTimestamp" title="xxx" aria-hidden="true" aria-live="off">10:29</span>
</a>
<div class="mx_MTextBody mx_EventTile_content">
  <span class="mx_EventTile_body markdown-body" dir="auto">
    <blockquote>
      <p>
        <span>
          <bdi>
            <a class="mx_Pill mx_UserPill mx_UserPill_me" href="xxx" aria-describedby="xxx">
              <img loading="lazy" class="mx_BaseAvatar mx_BaseAvatar_image" src="xxx?width=16&amp;height=16&amp;method=crop" style="width: 16px; height: 16px;" alt="" data-testid="avatar-img" aria-hidden="true">
              <span class="mx_Pill_text">yyy</span>
            </a>
          </bdi>
        </span>: ... ne suoraan syslog-palvelun kautta johki /var/log/syslog jne. <br> Se init-skriptien ...
      </p>
    </blockquote>
  </span>
</div>

So, as you can see, the Bridge (I assume) does not separate that reply and the quoted message: they are both inside the same <blockquote> element, there is just one <br> tag between them.

@wapsi wapsi added the bug Something isn't working label Jul 13, 2023
@HonbraDev
Copy link

From what I can see, this is more of an issue with Discord's non-standard Markdown not being parsed correctly. The bridge parses and sends it as one blockquote.

image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants