parameters: (self, partner_ids=None, guest_ids=None)
return_statement: return channel_data
docstring: Cancels the invitations of the RTC call from all invited members (or the specified partner_ids).
              :param list partner_ids: list of the partner ids from which the invitation has to be removed
              :param list guest_ids: list of the guest ids from which the invitation has to be removed
              if either partner_ids or guest_ids is set, only the specified ids will be invited.
docstring_summary: Cancels the invitations of the RTC call from all invited members (or the specified partner_ids).
              :param list partner_ids: list of the partner ids from which the invitation has to be removed
              :param list guest_ids: list of the guest ids from which the invitation has to be removed
              if either partner_ids or guest_ids is set, only the specified ids will be invited.
docstring_tokens: Cancels the invitations of the RTC call from all invited members ( or the specified partner_ids ) . : param list partner_ids : list of the partner ids from which the invitation has to be removed : param list guest_ids : list of the guest ids from which the invitation has to be removed if either partner_ids or guest_ids is set only the specified ids will be invited .
function: def _rtc_cancel_invitations(self, partner_ids=None, guest_ids=None):
          """ Cancels the invitations of the RTC call from all invited members (or the specified partner_ids).
              :param list partner_ids: list of the partner ids from which the invitation has to be removed
              :param list guest_ids: list of the guest ids from which the invitation has to be removed
              if either partner_ids or guest_ids is set, only the specified ids will be invited.
          """
          self.ensure_one()
          channel_partner_domain = [
              ('channel_id', '=', self.id),
              ('rtc_inviting_session_id', '!=', False),
          ]
          if partner_ids or guest_ids:
              channel_partner_domain = expression.AND([channel_partner_domain, [
                  '|',
                  ('partner_id', 'in', partner_ids or []),
                  ('guest_id', 'in', guest_ids or []),
              ]])
          invited_partners = self.env['res.partner']
          invited_guests = self.env['mail.guest']
          invitation_notifications = []
          for member in self.env['mail.channel.partner'].search(channel_partner_domain):
              member.rtc_inviting_session_id = False
              if member.partner_id:
                  invited_partners |= member.partner_id
                  target = member.partner_id
              else:
                  invited_guests |= member.guest_id
                  target = member.guest_id
              invitation_notifications.append((target, 'mail.channel/insert', {
                  'id': self.id,
                  'rtcInvitingSession': [('unlink',)],
              }))
          self.env['bus.bus']._sendmany(invitation_notifications)
          channel_data = {'id': self.id}
          if invited_guests:
              channel_data['invitedGuests'] = [('insert-and-unlink', [{'id': guest.id} for guest in invited_guests])]
          if invited_partners:
              channel_data['invitedPartners'] = [('insert-and-unlink', [{'id': partner.id} for partner in invited_partners])]
          if invited_partners or invited_guests:
              self.env['bus.bus']._sendone(self, 'mail.channel/insert', channel_data)
          return channel_data
function_tokens: def _rtc_cancel_invitations ( self , partner_ids = None , guest_ids = None ) : self . ensure_one ( ) channel_partner_domain = [ ( 'channel_id' , '=' , self . id ) , ( 'rtc_inviting_session_id' , '!=' , False ) , ] if partner_ids or guest_ids : channel_partner_domain = expression . AND ( [ channel_partner_domain , [ '|' , ( 'partner_id' , 'in' , partner_ids or [ ] ) , ( 'guest_id' , 'in' , guest_ids or [ ] ) , ] ] ) invited_partners = self . env [ 'res.partner' ] invited_guests = self . env [ 'mail.guest' ] invitation_notifications = [ ] for member in self . env [ 'mail.channel.partner' ] . search ( channel_partner_domain ) : member . rtc_inviting_session_id = False if member . partner_id : invited_partners |= member . partner_id target = member . partner_id else : invited_guests |= member . guest_id target = member . guest_id invitation_notifications . append ( ( target , 'mail.channel/insert' , { 'id' : self . id , 'rtcInvitingSession' : [ ( 'unlink' , ) ] , } ) ) self . env [ 'bus.bus' ] . _sendmany ( invitation_notifications ) channel_data = { 'id' : self . id } if invited_guests : channel_data [ 'invitedGuests' ] = [ ( 'insert-and-unlink' , [ { 'id' : guest . id } for guest in invited_guests ] ) ] if invited_partners : channel_data [ 'invitedPartners' ] = [ ( 'insert-and-unlink' , [ { 'id' : partner . id } for partner in invited_partners ] ) ] if invited_partners or invited_guests : self . env [ 'bus.bus' ] . _sendone ( self , 'mail.channel/insert' , channel_data ) return channel_data