def send_msg_multi(name, profile, recipients=None, rooms=None):
 ret = {'name': name, 'changes': {}, 'result': None, 'comment': ''}
 if ((recipients is None) and (rooms is None)):
  ret['comment'] = 'Recipients and rooms are empty, no need to send'
  return ret
 comment = ''
 if recipients:
  comment += ' users {0}'.format(recipients)
 if rooms:
  comment += ' rooms {0}'.format(rooms)
 comment += ', message: {0}'.format(name)
 if __opts__['test']:
  ret['comment'] = ('Need to send' + comment)
  return ret
 __salt__['xmpp.send_msg_multi'](message=name, recipients=recipients, rooms=rooms, profile=profile)
 ret['result'] = True
 ret['comment'] = ('Sent message to' + comment)
 return ret

def send_msg_multi ( name , profile , recipients = None , rooms = None ) : ret = { 'name' : name , 'changes' : { } , 'result' : None , 'comment' : '' } if ( ( recipients is None ) and ( rooms is None ) ) : ret [ 'comment' ] = 'Recipients and rooms are empty, no need to send' return ret comment = '' if recipients : comment += ' users {0}' . format ( recipients ) if rooms : comment += ' rooms {0}' . format ( rooms ) comment += ', message: {0}' . format ( name ) if __opts__ [ 'test' ] : ret [ 'comment' ] = ( 'Need to send' + comment ) return ret __salt__ [ 'xmpp.send_msg_multi' ] ( message = name , recipients = recipients , rooms = rooms , profile = profile ) ret [ 'result' ] = True ret [ 'comment' ] = ( 'Sent message to' + comment ) return ret
send a message to an xmpp recipient .