handling public private tweet functionailty at backend