mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
[Glitch] Fix notification message for own poll
Port a4301b52026827ad1cd90bfc77fabda92785a4c3 and be93318c0538ccfc41997301800dc347ad0f4271 to glitch-soc
This commit is contained in:
parent
ec567337dc
commit
84a27a08df
@ -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,6 +65,14 @@ export default class StatusPrepend extends React.PureComponent {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
case 'poll':
|
case 'poll':
|
||||||
|
if (me === account.get('id')) {
|
||||||
|
return (
|
||||||
|
<FormattedMessage
|
||||||
|
id='notification.own_poll'
|
||||||
|
defaultMessage='Your poll has ended'
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
return (
|
return (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='notification.poll'
|
id='notification.poll'
|
||||||
@ -71,6 +80,7 @@ export default class StatusPrepend extends React.PureComponent {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user