diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-11-06 15:06:53 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-11-06 15:06:53 +0100 |
commit | 84a27a08df5b4000a63b04e290a0f9ca502b226d (patch) | |
tree | a6d5b9103f342eb438ccbfc916df561913d61e3d /app/javascript/flavours/glitch | |
parent | ec567337dc21962996362c3917f6652a81bbd8e7 (diff) |
[Glitch] Fix notification message for own poll
Port a4301b52026827ad1cd90bfc77fabda92785a4c3 and be93318c0538ccfc41997301800dc347ad0f4271 to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r-- | app/javascript/flavours/glitch/components/status_prepend.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/app/javascript/flavours/glitch/components/status_prepend.js b/app/javascript/flavours/glitch/components/status_prepend.js index 344c4d423..637c4f23a 100644 --- a/app/javascript/flavours/glitch/components/status_prepend.js +++ b/app/javascript/flavours/glitch/components/status_prepend.js @@ -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; } |