You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

actions.web.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435
  1. // @flow
  2. import type { Dispatch } from 'redux';
  3. import { getParticipantDisplayName } from '../base/participants';
  4. import {
  5. NOTIFICATION_TYPE,
  6. showNotification
  7. } from '../notifications';
  8. /**
  9. * Notify that we've been kicked out of the conference.
  10. *
  11. * @param {JitsiParticipant} participant - The {@link JitsiParticipant}
  12. * instance which initiated the kick event.
  13. * @param {?Function} _ - Used only in native code.
  14. * @returns {Function}
  15. */
  16. export function notifyKickedOut(participant: Object, _: ?Function) { // eslint-disable-line no-unused-vars
  17. return (dispatch: Dispatch<any>, getState: Function) => {
  18. const args = {
  19. participantDisplayName:
  20. getParticipantDisplayName(getState, participant.getId())
  21. };
  22. dispatch(showNotification({
  23. appearance: NOTIFICATION_TYPE.ERROR,
  24. hideErrorSupportLink: true,
  25. descriptionKey: 'dialog.kickMessage',
  26. descriptionArguments: args,
  27. titleKey: 'dialog.kickTitle',
  28. titleArguments: args
  29. }));
  30. };
  31. }