Replace message id strictly
This commit is contained in:
parent
bbfcb2f946
commit
d5cf5072c8
|
@ -206,7 +206,7 @@ func (client *Client) Send(req Request) (*Response, error) {
|
||||||
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(strconv.FormatInt(m.Id, 10)), []byte(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):
|
||||||
return response, nil
|
return response, nil
|
||||||
|
|
Loading…
Reference in a new issue