Base solution for your next web application
Open Closed

Send Notification to user on webhooks? #6353


User avatar
0
XugoWebTeam created

Hi Team,

I used a webhooks to create tasks for different tenants automatically. I am having issues to send the notifications to users. Becuase the webhooks are processed at the host side without any user logged in. It does not have the access to the user via the UserManage or UserRepository. How can I get the user info by the username or id? How can I send the notification to the correct user? Thanks


3 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    To switch between Host and Tenants, use AbpSession.Use (docs) and/or _unitOfWorkManager.Current.SetTenantId (docs) methods.

  • User Avatar
    0
    XugoWebTeam created

    Hi Aaron,

    I did have tried to use the AbpSession.Use but did not work. I will try _unitOfWorkManager.Current.SetTenantId , Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    @xugowebteam

    Probably _unitOfWorkManager.Current.SetTenantId will work.