Method SendGenericTemplateMessageAsync
HiznyakNikita edited this page Sep 3, 2016
·
2 revisions
sends a message with generic template message to user
- long userId - user ID , user id for whom message is sent
- List elements - list of GenericTemplateElement type objects which will be send to user in message
A message with generic template sent to the user
public async Task SendMessage(long userId, Message message) { if (message.Attachment.Payload.GetType() == typeof(GenericTemplate)) await _api.SendGenericTemplateMessageAsync(userId, (message.Attachment.Payload as GenericTemplate).Elements.ToList()); }