Closed imolein closed 4 years ago
After a quick look on the code and without knowing golang, I changed one line, which fixed it for me:
diff --git a/bridge/zulip/zulip.go b/bridge/zulip/zulip.go
index 9fcc54af..50d5f54d 100644
--- a/bridge/zulip/zulip.go
+++ b/bridge/zulip/zulip.go
@@ -141,7 +141,7 @@ func (b *Bzulip) handleQueue() error {
Channel: b.getChannel(m.StreamID) + "/topic:" + m.Subject,
Account: b.Account,
UserID: strconv.Itoa(m.SenderID),
- Avatar: m.AvatarURL,
+ Avatar: b.GetString("server") + m.AvatarURL,
}
b.Log.Debugf("<= Sending message from %s on %s to gateway", rmsg.Username, b.Account)
b.Log.Debugf("<= Message is %#v", rmsg)
But I don't know whether this is the correct place to do this or not. :)
Seems like they did some changes with the avatar_url and do not include the full URI anymore.; Is this an upload avatar image?
Yes, the path in AvatarURL
is the avatar image. If I concat the server with the AvatarURL, the avatar is loaded.
Strange I've tested this on the zulipchat servers and it show a correct AvatarURL: Avatar:"https://zulip-avatars.s3.amazonaws.com/4757/55047f83ee6e4f876c806cf576d5e94bfd4ab787?x=x&version=2"
I'll have to do a check if the URL begins with http or not
Strange I've tested this on the zulipchat servers and it show a correct AvatarURL
I guess it's the only the path if the avatar is stored on the same domain as the server runs and the whole URL if a different storage backend, like s3, is used.
Neverless, thanks for the fix :)
First, thanks for the Zulip fix in the last release! :)
Describe the bug I tested the latest release of matterbridge today, but got an error, when sending a message from Zulip to Discord. (see debug log below) Sending messages from Discord to Zulip works fine.
To Reproduce
Expected behavior The message is sent to discord.
Screenshots/debug logs
Environment (please complete the following information):
Additional context