msbotbuilder-go icon indicating copy to clipboard operation
msbotbuilder-go copied to clipboard

Add GetSenderInfo function to get message sender info

Open risboo6909 opened this issue 3 years ago • 0 comments

So I missed the feature to get an email address of the user sending message to my bot.

Opening PR, because this feature may be helpful for other people.

Usage pattern is like this (I omitted errors handling for simplicity):

act, _ := s.bot.ParseRequest(ctx, req)
senderInfo, _ := s.bot.GetSenderInfo(ctx, act)

senderInfo will contain user info (including email address, id, name, etc).

risboo6909 avatar Mar 01 '21 18:03 risboo6909