Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bridge/discord/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ func (b *Bdiscord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreat
go func() {
count := 0
for _, attach := range m.Attachments {
err := b.AddAttachmentFromURL(&rmsg, attach.Filename, attach.ID, "", attach.URL)
// The URL isn't technically private, but it's short-lived so we
// strip it so other networks don't rely on it (attachment passed as bytes).
err := b.AddAttachmentFromProtectedURL(&rmsg, attach.Filename, attach.ID, "", attach.URL)
if err != nil {
b.Log.WithError(err).Warnf("Failed to download attachment %s", attach.Filename)
continue
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
- irc: Leading colon messages are no longer doubled by default as an undocumented hack (eg `:D` -> `::D`); it's now enabled by the `DoubleColonPrefix` setting.
If you are using this setting please help us understand the usecase by commenting
on [issue #122](https://github.com/matterbridge-org/matterbridge/issues/122), otherwise this setting may be deprecated in the near-future.
- discord: Attachments are now passed as raw bytes and reuploaded either to the mediaserver, or to the destination bridges,
as discord CDN URLs are short-lived and people from other bridges would complain about broken URLs; this means IRC users will
no longer receive discord attachments as URLs unless a mediaserver is configured ([#170](https://github.com/matterbridge-org/matterbridge/pull/170))

## New Features

Expand Down
Loading