replace log with debug in old code

This commit is contained in:
Andriy Cherniy 2024-01-05 00:50:35 +02:00
parent d5ae0bcb0c
commit 32f70f43ef

View file

@ -119,13 +119,13 @@ func main() {
matrix_client.SendText(m_id.RoomID(ROOM_ID), "Бот запущений!")
syncer.OnEventType(m_event.EventReaction, func(source mautrix.EventSource, ev *m_event.Event) {
log.Info("reactions")
log.Debug("reactions")
// if ev.RoomID == ROOM_ID && ev.Content != nil &&
content := ev.Content.AsReaction()
key := []rune(content.RelatesTo.Key)
log.Info(content.RelatesTo.Key)
log.Debug(content.RelatesTo.Key)
if ev.RoomID.String() == ROOM_ID && (key[0] == '👍' || key[0] == '👎') {
log.Info("reacted well")
log.Debug("reacted well")
var post Post
if err := db.First(&post, "message_id = ?", content.RelatesTo.EventID.String()).Error; err != nil {
log.Error(err)