Fix messageSendingStatePending replacer

This commit is contained in:
c0re100 2023-11-25 04:24:41 +08:00
parent 9a3301fbd7
commit 4459ee0f55
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF

View file

@ -211,7 +211,7 @@ func (client *Client) Send(req Request) (*Response, error) {
if err2 != nil { if err2 != nil {
return response, nil return response, nil
} }
response.Data = bytes.Replace(response.Data, []byte("{\"@type\":\"messageSendingStatePending\"}"), []byte("{\"@type\":\"updateMessageSendSucceeded\"}"), 1) response.Data = bytes.Replace(response.Data, []byte("\"@type\":\"messageSendingStatePending\""), []byte("\"@type\":\"updateMessageSendSucceeded\""), 1)
response.Data = bytes.Replace(response.Data, []byte("\"id\":"+strconv.FormatInt(m.Id, 10)), []byte("\"id\":"+strconv.FormatInt(m2.Message.Id, 10)), 1) response.Data = bytes.Replace(response.Data, []byte("\"id\":"+strconv.FormatInt(m.Id, 10)), []byte("\"id\":"+strconv.FormatInt(m2.Message.Id, 10)), 1)
return response, nil return response, nil
case <-time.After(1 * time.Second): case <-time.After(1 * time.Second):