mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-05 03:23:50 +08:00
Keep private message length as 5k
This commit is contained in:
parent
cd01eed601
commit
f7e5b326dc
@ -16,7 +16,7 @@ func (c *QQClient) SendPrivateMessage(target int64, m *message.SendingMessage) *
|
|||||||
t := time.Now().Unix()
|
t := time.Now().Unix()
|
||||||
imgCount := m.Count(func(e message.IMessageElement) bool { return e.Type() == message.Image })
|
imgCount := m.Count(func(e message.IMessageElement) bool { return e.Type() == message.Image })
|
||||||
msgLen := message.EstimateLength(m.Elements, 703)
|
msgLen := message.EstimateLength(m.Elements, 703)
|
||||||
if msgLen > 703 || imgCount > 50 {
|
if msgLen > 5000 || imgCount > 50 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if msgLen > 300 || imgCount > 2 {
|
if msgLen > 300 || imgCount > 2 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user