Skip to content

Commit

Permalink
replace tenor links
Browse files Browse the repository at this point in the history
  • Loading branch information
Techbot121 authored and Meta Construct committed Jun 13, 2024
1 parent adc1daf commit ae204b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/services/gamebridge/payloads/ChatPayload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ export default class ChatPayload extends Payload {
: "(uncached user)"
}`
);
content = content.replace(
/(https?:\/\/tenor.com\/view\/\S+)/g,
(_, url) => url + "?.gif"
);

for (const [, attachment] of msg.attachments) {
content += (content.length > 0 ? "\n" : "") + attachment.url;
}
Expand Down

0 comments on commit ae204b0

Please sign in to comment.