[Glitch] Fix notification message for own poll
Portlolsob-rspecd99acc9587
and3df536ec92
to glitch-soc
parent
2030c85cfa
commit
00af41825f
|
@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
import Icon from 'flavours/glitch/components/icon';
|
import Icon from 'flavours/glitch/components/icon';
|
||||||
|
import { me } from 'flavours/glitch/util/initial_state';
|
||||||
|
|
||||||
export default class StatusPrepend extends React.PureComponent {
|
export default class StatusPrepend extends React.PureComponent {
|
||||||
|
|
||||||
|
@ -64,12 +65,21 @@ export default class StatusPrepend extends React.PureComponent {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
case 'poll':
|
case 'poll':
|
||||||
return (
|
if (me === account.get('id')) {
|
||||||
<FormattedMessage
|
return (
|
||||||
id='notification.poll'
|
<FormattedMessage
|
||||||
defaultMessage='A poll you have voted in has ended'
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue