~edwargix/msc-link-bot

47abb030a6d7c201ade3f388b8e8b63ef2bf9292 — David Florness 3 years ago c0f4d8a
Don't send events with an empty body

fixes 09557e4
1 files changed, 3 insertions(+), 0 deletions(-)

M main.go
M main.go => main.go +3 -0
@@ 141,6 141,9 @@ func getMsgResponse(client *mautrix.Client, evt *event.Event) *event.MessageEven
		}
		retBody += fmt.Sprintf("https://github.com/matrix-org/matrix-doc/pull/%v", msc)
	}
	if retBody == "" {
		return nil
	}
	return &event.MessageEventContent{
		MsgType: event.MsgNotice,
		Body:    retBody,