added handling for sharing with link
NOTE: only encryption work atm