replace log with debug in old code
This commit is contained in:
parent
d5ae0bcb0c
commit
32f70f43ef
1 changed files with 3 additions and 3 deletions
6
main.go
6
main.go
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue