mirror of https://github.com/velour/catbase.git
add text if missing
This commit is contained in:
parent
4cefc8a784
commit
645a533f49
|
@ -459,6 +459,9 @@ func (p *FactoidPlugin) sendImage(c bot.Connector, message msg.Message, msg stri
|
||||||
Str("msg", msg).
|
Str("msg", msg).
|
||||||
Msg("Sending image attachment")
|
Msg("Sending image attachment")
|
||||||
if imgSrc != "" {
|
if imgSrc != "" {
|
||||||
|
if txt == "" {
|
||||||
|
txt = imgSrc
|
||||||
|
}
|
||||||
img := bot.ImageAttachment{
|
img := bot.ImageAttachment{
|
||||||
URL: imgSrc,
|
URL: imgSrc,
|
||||||
AltTxt: txt,
|
AltTxt: txt,
|
||||||
|
|
Loading…
Reference in New Issue