AmarnathCJD / gogram

Full-native implementation of MTProto protocol on Golang.
GNU General Public License v3.0
191 stars 37 forks source link

Message formatting error #133

Closed TheKaram closed 1 month ago

TheKaram commented 1 month ago

Code

x := `**This is a test message**
My channel: @JustTest
<pre>
fmt.Println("test")
</pre>`
_, err = msg.Reply(x, telegram.SendOptions{
    ParseMode: telegram.HTML,
})
if err != nil {
    fmt.Println(err)
}

Error

2024/08/09 11:03:38 [debug] gogram [mtproto] - rpc - response: *objects.RpcError
sending MessagesSendMessage: [ENTITY_BOUNDS_INVALID] A specified [entity offset or length](/api/entities#entity-length) is invalid, see [here &raquo;](https://core.telegram.org/api/entities#entity-length) for info on how to properly compute the entity offset/length. (code 400)
AmarnathCJD commented 1 month ago

Bruh

AmarnathCJD commented 1 month ago

now the given string is working.

it was a tag length issue