mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-15 00:19:24 +01:00
parent
75f67d2de4
commit
cec63546ff
@ -135,13 +135,19 @@ func (b *Bzulip) handleQueue() error {
|
|||||||
if m.SenderEmail == b.GetString("login") {
|
if m.SenderEmail == b.GetString("login") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
avatarURL := m.AvatarURL
|
||||||
|
if !strings.HasPrefix(avatarURL, "http") {
|
||||||
|
avatarURL = b.GetString("server") + avatarURL
|
||||||
|
}
|
||||||
|
|
||||||
rmsg := config.Message{
|
rmsg := config.Message{
|
||||||
Username: m.SenderFullName,
|
Username: m.SenderFullName,
|
||||||
Text: m.Content,
|
Text: m.Content,
|
||||||
Channel: b.getChannel(m.StreamID) + "/topic:" + m.Subject,
|
Channel: b.getChannel(m.StreamID) + "/topic:" + m.Subject,
|
||||||
Account: b.Account,
|
Account: b.Account,
|
||||||
UserID: strconv.Itoa(m.SenderID),
|
UserID: strconv.Itoa(m.SenderID),
|
||||||
Avatar: m.AvatarURL,
|
Avatar: avatarURL,
|
||||||
}
|
}
|
||||||
b.Log.Debugf("<= Sending message from %s on %s to gateway", rmsg.Username, b.Account)
|
b.Log.Debugf("<= Sending message from %s on %s to gateway", rmsg.Username, b.Account)
|
||||||
b.Log.Debugf("<= Message is %#v", rmsg)
|
b.Log.Debugf("<= Message is %#v", rmsg)
|
||||||
|
Loading…
Reference in New Issue
Block a user