UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

1 lines 550 B
function buildSlackAuthContext(e){let t=e.isBot===!0,n=e.teamId?t?`slack:${e.teamId}:bot:${e.userId}`:`slack:${e.teamId}:${e.userId}`:t?`slack:bot:${e.userId}`:`slack:${e.userId}`,r={author_type:t?`bot`:`user`,channel_id:e.channelId,thread_ts:e.threadTs,user_id:e.userId};return e.userName&&(r.user_name=e.userName),e.fullName&&(r.full_name=e.fullName),e.teamId&&(r.team_id=e.teamId),{attributes:r,authenticator:`slack-webhook`,issuer:e.teamId?`slack:${e.teamId}`:`slack`,principalId:n,principalType:t?`service`:`user`}}export{buildSlackAuthContext};