XBackBone icon indicating copy to clipboard operation
XBackBone copied to clipboard

discord no longer embedding

Open iphqne opened this issue 5 years ago • 8 comments

System Info

  • PHP Version: 7.4
  • XBackBone Version: 3.5.0
  • Webserver: [Apache/Nginx/...] https://www.litespeedtech.com/
  • Database backend: [SQLite/Mysql/...] sqlite

Describe the bug Discord is no longer embedding images that are sent UNLESS "/raw" is appended to the image or the "embed images" option is on

To Reproduce Steps to reproduce the behavior:

  1. Upload an image using xbackbone
  2. Post it to discord
  3. Watch it not embed

Expected behavior The image to actually embed

Screenshots https://iphqne.com/-/SiLo9/jaYaLOmA74.gif/raw d08g70I7wr https://iphqne.com/-/SiLo9/NOYiculA58.gif/raw xqdSgwYyCK

I think discord have maybe changed something in the way they embed images and because the normal url isn't an actual raw image it's struggling to embed.

iphqne avatar Oct 15 '21 20:10 iphqne

I have this issue as well. Same configuration.

6K6666 avatar Oct 15 '21 20:10 6K6666

Having exact same issues except /raw does not embed either for me.

Skizzles avatar Oct 16 '21 10:10 Skizzles

Discord has changed the user agent they use to fetch embeds.

You need to either change this line: https://github.com/SergiX44/XBackBone/blob/master/app/Web/UA.php#L22

to: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0' => true

or add a comma at the end of line 22 and add the same as above on the next line

TheDevFreak avatar Oct 16 '21 14:10 TheDevFreak

@SergiX44

related to this, the video embed shows 0 seconds and does not actually play the content even after this change.

Skizzles avatar Oct 18 '21 06:10 Skizzles

just tested the video issue, same for me.

iphqne avatar Oct 18 '21 10:10 iphqne

After upgrading to the latest xbackbone version, videos under 50mb instantly embed, however like Skizzles, it displays a video lenght of 0 and fails to actually play.

LobaDK avatar Oct 23 '21 16:10 LobaDK

After upgrading to the latest xbackbone version, videos under 50mb instantly embed, however like Skizzles, it displays a video length of 0 and fails to actually play.

having the same issue here as well it now embeds but it can't play as time is just 0:00

https://user-images.githubusercontent.com/56127525/139151356-c1647762-0588-4cac-8568-ac80cad07720.mp4

FYI link to the video https://cdn.thatguyjack.co.uk/Pibi1/JItETOYe91.mp4

That-Guy-Jack avatar Oct 27 '21 21:10 That-Guy-Jack

Pictures also doesn't always embed for me even if I say /raw same with my budyd who host his own instance. Sometimes it does sometimes it doesn't. It doesn't embed without /raw like it used to

AlexTheGoat69 avatar Nov 12 '21 04:11 AlexTheGoat69