|
@@ -72,26 +72,26 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
72
|
72
|
const { conference } = action;
|
73
|
73
|
|
74
|
74
|
if (getState()['features/visitors'].iAmVisitor) {
|
75
|
|
- dispatch(openDialog(JoinMeetingDialog));
|
76
|
75
|
|
77
|
76
|
const { demoteActorDisplayName } = getState()['features/visitors'];
|
78
|
77
|
|
79
|
|
- dispatch(setVisitorDemoteActor(undefined));
|
80
|
|
-
|
81
|
|
- const notificationParams: INotificationProps = {
|
82
|
|
- titleKey: 'visitors.notification.title',
|
83
|
|
- descriptionKey: 'visitors.notification.description'
|
84
|
|
- };
|
85
|
|
-
|
86
|
78
|
if (demoteActorDisplayName) {
|
87
|
|
- notificationParams.descriptionKey = 'visitors.notification.demoteDescription';
|
88
|
|
- notificationParams.descriptionArguments = {
|
89
|
|
- actor: demoteActorDisplayName
|
|
79
|
+ const notificationParams: INotificationProps = {
|
|
80
|
+ titleKey: 'visitors.notification.title',
|
|
81
|
+ descriptionKey: 'visitors.notification.demoteDescription',
|
|
82
|
+ descriptionArguments: {
|
|
83
|
+ actor: demoteActorDisplayName
|
|
84
|
+ }
|
90
|
85
|
};
|
|
86
|
+
|
|
87
|
+ batch(() => {
|
|
88
|
+ dispatch(showNotification(notificationParams, NOTIFICATION_TIMEOUT_TYPE.STICKY));
|
|
89
|
+ dispatch(setVisitorDemoteActor(undefined));
|
|
90
|
+ });
|
|
91
|
+ } else {
|
|
92
|
+ dispatch(openDialog(JoinMeetingDialog));
|
91
|
93
|
}
|
92
|
94
|
|
93
|
|
- // check for demote actor and update notification
|
94
|
|
- dispatch(showNotification(notificationParams, NOTIFICATION_TIMEOUT_TYPE.STICKY));
|
95
|
95
|
} else {
|
96
|
96
|
dispatch(setVisitorsSupported(conference.isVisitorsSupported()));
|
97
|
97
|
conference.on(JitsiConferenceEvents.VISITORS_SUPPORTED_CHANGED, (value: boolean) => {
|