add default poll color for chat results

This commit is contained in:
KDSBrowne 2021-02-05 16:29:58 +00:00
parent 0d63383c2a
commit 852ea929a8
2 changed files with 6 additions and 3 deletions

View File

@ -6,7 +6,7 @@ import Icon from '/imports/ui/components/icon/component';
import UserAvatar from '/imports/ui/components/user-avatar/component';
import cx from 'classnames';
import Message from './message/component';
import PollService from '/imports/ui/components/poll/service';
import { styles } from './styles';
const propTypes = {
@ -192,7 +192,7 @@ class MessageListItem extends Component {
<div className={styles.avatarWrapper}>
<UserAvatar
className={styles.avatar}
color={user.color}
color={PollService.POLL_AVATAR_COLOR}
moderator={user.isModerator}
>
{<Icon className={styles.isPoll} iconName="polling" />}
@ -217,7 +217,7 @@ class MessageListItem extends Component {
lastReadMessageTime={lastReadMessageTime}
handleReadMessage={handleReadMessage}
scrollArea={scrollArea}
color={user.color}
color={PollService.POLL_AVATAR_COLOR}
isDefaultPoll={isDefaultPoll(messages[0].text.replace('bbb-published-poll-<br/>', ''))}
/>
</div>

View File

@ -3,6 +3,8 @@ import Users from '/imports/api/users';
import Auth from '/imports/ui/services/auth';
import Polls from '/imports/api/polls';
const POLL_AVATAR_COLOR = '#3B48A9';
// 'YN' = Yes,No
// 'YNA' = Yes,No,Abstention
// 'TF' = True,False
@ -82,4 +84,5 @@ export default {
currentPoll: () => Polls.findOne({ meetingId: Auth.meetingID }),
pollAnswerIds,
sendGroupMessage,
POLL_AVATAR_COLOR,
};