phone.setCallRating
Rate a call, returns info about the rating message sent to the official VoIP bot, see here » for more info on the full flow.
func (c *Client) PhoneSetCallRating(ctx context.Context, request *PhoneSetCallRatingRequest) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PhoneSetCallRating(ctx, &tg.PhoneSetCallRatingRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
UserInitiative | bool | — | Whether the user decided on their own initiative to rate the call, must NOT be set if rating was requested by the server with phoneCallDiscarded.need_rating. |
Peer | InputPhoneCall | yes | The call to rate |
Rating | int | yes | Rating in 1-5 stars |
Comment | string | yes | An additional comment with problem hashtags, see here » for more info on the full flow. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CALL_PEER_INVALID | The provided call peer object is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
phone.setCallRating#59ead627