updates: don't error just warn on unknown messages/actions
This commit is contained in:
@@ -565,11 +565,17 @@ func (t *TelegramClient) onUpdateNewMessage(ctx context.Context, entities tg.Ent
|
|||||||
// case *tg.MessageActionBoostApply:
|
// case *tg.MessageActionBoostApply:
|
||||||
// case *tg.MessageActionRequestedPeerSentMe:
|
// case *tg.MessageActionRequestedPeerSentMe:
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unknown action type %T", action)
|
log.Warn().
|
||||||
|
Type("action_type", action).
|
||||||
|
Msg("ignoring unknown action type")
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unknown message type %T", msg)
|
log.Warn().
|
||||||
|
Type("action_type", msg).
|
||||||
|
Msg("ignoring unknown message type")
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user