Skip to main content

stats.getMessagePublicForwards

Obtains a list of messages, indicating to which other public channels was a channel message forwarded. Will return a list of messages with peer_id equal to the public channel to which this message was forwarded.

func (c *Client) StatsGetMessagePublicForwards(ctx context.Context, request *StatsGetMessagePublicForwardsRequest) (*StatsPublicForwards, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.StatsGetMessagePublicForwards(ctx, &tg.StatsGetMessagePublicForwardsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *StatsPublicForwards
return nil
})

Parameters

NameTypeRequiredDescription
ChannelInputChannelClassyesSource channel
MsgIDintyesSource message ID
OffsetstringyesOffset for pagination, empty string on first call, then use the next_offset field of the returned constructor (if present, otherwise no more results are available).
LimitintyesMaximum number of results to return, see pagination

Returns

*StatsPublicForwards

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400PEER_ID_INVALIDThe provided peer id is invalid.

References