2017-10-28 03:29:48 +08:00
|
|
|
import React from 'react';
|
2018-01-08 12:44:42 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
2017-03-17 03:57:45 +08:00
|
|
|
import UserListService from '/imports/ui/components/user-list/service';
|
2017-03-29 02:41:48 +08:00
|
|
|
import Settings from '/imports/ui/services/settings';
|
2018-08-10 01:02:18 +08:00
|
|
|
import ChatAlert from './component';
|
2017-03-17 03:57:45 +08:00
|
|
|
|
2018-08-10 01:02:18 +08:00
|
|
|
const ChatAlertContainer = props => (
|
|
|
|
<ChatAlert {...props} />
|
2017-10-28 03:29:48 +08:00
|
|
|
);
|
2017-03-17 03:57:45 +08:00
|
|
|
|
2018-01-08 12:44:42 +08:00
|
|
|
export default withTracker(() => {
|
2017-03-29 02:41:48 +08:00
|
|
|
const AppSettings = Settings.application;
|
2017-10-28 03:29:48 +08:00
|
|
|
const openChats = UserListService.getOpenChats();
|
2017-03-17 03:57:45 +08:00
|
|
|
|
|
|
|
return {
|
|
|
|
disableAudio: !AppSettings.chatAudioNotifications,
|
2017-10-28 03:29:48 +08:00
|
|
|
disableNotify: !AppSettings.chatPushNotifications,
|
|
|
|
openChats,
|
2018-05-30 00:43:11 +08:00
|
|
|
publicUserId: Meteor.settings.public.chat.public_userid,
|
2017-03-17 03:57:45 +08:00
|
|
|
};
|
2018-08-10 01:02:18 +08:00
|
|
|
})(ChatAlertContainer);
|