Browse Source

[Glitch] Fix notification message for own poll

Port a4301b5202 and be93318c05 to glitch-soc
closed-social-glitch-2
Thibaut Girka 5 years ago
parent
commit
84a27a08df
1 changed files with 16 additions and 6 deletions
  1. +16
    -6
      app/javascript/flavours/glitch/components/status_prepend.js

+ 16
- 6
app/javascript/flavours/glitch/components/status_prepend.js View File

@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
import Icon from 'flavours/glitch/components/icon';
import { me } from 'flavours/glitch/util/initial_state';
export default class StatusPrepend extends React.PureComponent {
@ -64,12 +65,21 @@ export default class StatusPrepend extends React.PureComponent {
/>
);
case 'poll':
return (
<FormattedMessage
id='notification.poll'
defaultMessage='A poll you have voted in has ended'
/>
);
if (me === account.get('id')) {
return (
<FormattedMessage
id='notification.own_poll'
defaultMessage='Your poll has ended'
/>
);
} else {
return (
<FormattedMessage
id='notification.poll'
defaultMessage='A poll you have voted in has ended'
/>
);
}
}
return null;
}

Loading…
Cancel
Save