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

3.11.0 Attachments and embed are cut off / limited in length #20556

Closed
2 tasks
wreiske opened this issue Feb 2, 2021 · 25 comments
Closed
2 tasks

3.11.0 Attachments and embed are cut off / limited in length #20556

wreiske opened this issue Feb 2, 2021 · 25 comments
Assignees

Comments

@wreiske
Copy link
Contributor

wreiske commented Feb 2, 2021

Description:

The new embeds for messages have broken a lot of functionality we previously relied on. The new format is much larger and doesn't show the full message body.

Steps to reproduce:

  1. See below

Expected behavior:

  • Favicons shouldn't show if they don't exist or if they fail to load
  • Messages shouldn't cut off with elipsis.

Actual behavior:

Broken embed favicons shouldn't show if they don't exist

image

Embeds have a ton of padding between words and don't show the full message body (cut off with ...)

image

Another example of a message getting cut off.
image

Server Setup Information:

  • Version of Rocket.Chat Server: 3.11.0
@wreiske
Copy link
Contributor Author

wreiske commented Feb 2, 2021

#20555 was auto-closed by a robot, so I'm duplicating this ticket.

@aditya-mitra
Copy link
Contributor

Can you point out the previous implementation (if you remember the file)?

I guess instead of wrapping the text with ellipsis, we can display the full text in multiple lines. Any suggestions?

@yash-rajpal
Copy link
Member

Can you please elaborate on steps to reproduce?

Also this feels similar to #20539 , I don't know if this is same or different. Please check and confirm.
Thanks :)

@wreiske
Copy link
Contributor Author

wreiske commented Feb 2, 2021

Can you please elaborate on steps to reproduce?

Also this feels similar to #20539 , I don't know if this is same or different. Please check and confirm.
Thanks :)

Steps to reproduce would be to setup an incoming webhook and send a long message to it. Try adding a few fields, etc...

This issue does not look like it is the same. The issue you listed is a markdown formatting issue. This ticket is more for the regression of embeds since the move to react from blaze.

@zpavlig
Copy link
Contributor

zpavlig commented Feb 2, 2021

after updating to version 3.11.0, the hooks also began to work like this:
Снимок

@fdellwing
Copy link

fdellwing commented Feb 2, 2021

Can confirm this. Our social media webhooks are now limited to a very small text snippet.

Code example
#!/usr/bin/env python3.7

import requests
from tweepy import OAuthHandler, Stream
from tweepy.streaming import StreamListener
from secrets import *

follow_accounts = ["564768235", "4742812221"]


def from_creator(status):
  if status.in_reply_to_status_id is not None:
      return False
  elif status.in_reply_to_screen_name is not None:
      return False
  elif status.in_reply_to_user_id is not None:
      return False
  elif status.user.id_str not in follow_accounts:
      return False
  else:
      return True


class RocketChatListener(StreamListener):
  def on_status(self, status):
      if from_creator(status):
          name: str = status.user.name
          tag: str = status.user.screen_name
          text: str = status.text
          url: str = f"https://twitter.com/{tag}/status/{status.id_str}"
          print(f"{name} (@{tag}): {text} -> {url}")
          tweet = {
              "text": f"Neuer Tweet von {name} (@{tag}):",
              "attachments": [
                  {
                      "text": text,
                      "fields": [
                          {
                              "short": True,
                              "title": "",
                              "value": f"[Direkt zum Tweet]({url})",
                          }
                      ]
                  }
              ]
          }
          requests.post(json=tweet, url=rocket_hook)
      return True

  def on_error(self, status_code):
      if status_code == 420:
          return False


if __name__ == '__main__':
  listener = RocketChatListener()
  auth = OAuthHandler(consumer_key, consumer_secret)
  auth.set_access_token(access_token, access_token_secret)

  stream = Stream(auth, listener)
  stream.filter(follow=follow_accounts)

@aditya-mitra
Copy link
Contributor

This also happens with url embeds.

url embed problem

@websvcPT
Copy link

websvcPT commented Feb 3, 2021

Plus one with version 3.11.0

image

@NargiT
Copy link

NargiT commented Feb 4, 2021

I do confirm that new version of attachments broke the rendering.

  • Markdown are not supported in attachment anymore
    image
  • text is cut

might be related to those changes #20106 #20291 #20255 ?

@aditya-mitra
Copy link
Contributor

@wreiske Just a question.
Does #20606 fix the second part of your issue - Message are cutoff ?

@svrnwnsch
Copy link

will this be fixed in version 3.11.1?

@aditya-mitra
Copy link
Contributor

@wreiske
Can you please change the title of this issue? This is because it not related to OEmbeds but to DefaultAttachments. That created a confusion which led to the wrong PR which would have closed this issue (my mistake).
More on this here at #20560 comment. Thanks you very much @dannielpotthast for pointing it out.

A better title would be 3.11.0 DefaultAttachments - Text is cutoff and Improper Layout

But, thanks to you we could figure out another significant bug that there was problem in URL Embed as pointed out in #20628 .

However, I am sure #20606 and #20618 will be able to resolve the last 2 problems in this issue. (The Favicon Issue can be tackled in Rocket.Chat.Fuselage where I have put up this issue of broken images

If am missing anything, please help me by pointing them out.

Thanks a lot again.

@wreiske
Copy link
Contributor Author

wreiske commented Feb 6, 2021

@aditya-mitra amazing work fixing these so quickly! I will change the title to something better.

@wreiske wreiske changed the title 3.11.0 embeds are cut off / limited 3.11.0 Attachments and embeds are cut off / limited in length Feb 6, 2021
@Karting06
Copy link
Contributor

I'm using an integration that sends multiple fields with short param true. In previous versions, it uses the whole width. Now, it seems to be limited to 480 px (limited by CSS parameter max-width).

This PR changes it back to using whole width: #20645

@RealJTG
Copy link

RealJTG commented Feb 11, 2021

Attachment fields now looks really clumsy

_2021-02-12-010856_1519x544_scrot

@aditya-mitra
Copy link
Contributor

@RealJTG Will #20618 solve the problem indicated by you by any chance?

@Karting06
Copy link
Contributor

@RealJTG For the width, that should be fixed with #20645

@Exordian
Copy link
Contributor

Exordian commented Feb 12, 2021

we'd love to see a minor version bump with a fix included ASAP. this change broke the view of a lot of integrations on our instance

@phil-davis
Copy link

Here is a "simple" example of how the chat message is cut off and also does not wrap:
Screenshot_2021-02-16 Chat

@immanuelfodor
Copy link

@phil-davis You're lucky that you get clickable links at the cutoff, I'm stuck with unformatted markdown with broken links 😅

@svrnwnsch
Copy link

@phil-davis You're lucky that you get clickable links at the cutoff, I'm stuck with unformatted markdown with broken links 😅

we have this too it is very annoying and frustating please fix this soon 🙏

@ggazzo ggazzo self-assigned this Feb 18, 2021
@ggazzo ggazzo changed the title 3.11.0 Attachments and embeds are cut off / limited in length 3.11.0 Attachments and fields are cut off / limited in length Feb 18, 2021
@ggazzo ggazzo changed the title 3.11.0 Attachments and fields are cut off / limited in length 3.11.0 Attachments and embed are cut off / limited in length Feb 18, 2021
@ggazzo
Copy link
Member

ggazzo commented Feb 18, 2021

@wreiske are you sure about the embed avatar? We didnt change the embeds yet. I'm not saying thats ok, but maybe its not related with 3.11.0 🤔

@DerDanilo
Copy link

Same here. Is there some seeting that can be changed?

@fdellwing
Copy link

There is #20569 and #20606 for this.

@wreiske
Copy link
Contributor Author

wreiske commented Apr 30, 2021

After upgrading to 3.14.0, the padding between the fields from my initial report looks to be fixed.

image

Also, it looks like the text now properly wraps instead of being hidden by an ellipsis.
image

I'm going to mark this ticket as resolved/closed as this is now fixed in the 3.14.0 release. If anyone has a specific issue that doesn't relate exactly to the initial issue I opened, please feel free to create a new issue!

Thanks :)

@wreiske wreiske closed this as completed Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests