mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-28 04:09:18 +03:00
Don't allow self to mention self lolol
This commit is contained in:
parent
a0d4d9e08c
commit
4f3d503a35
1 changed files with 3 additions and 1 deletions
|
@ -407,6 +407,7 @@ function RelatedActions({ info, instance, authenticated }) {
|
||||||
} = relationship || {};
|
} = relationship || {};
|
||||||
|
|
||||||
const [currentInfo, setCurrentInfo] = useState(null);
|
const [currentInfo, setCurrentInfo] = useState(null);
|
||||||
|
const [isSelf, setIsSelf] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (info) {
|
if (info) {
|
||||||
|
@ -439,6 +440,7 @@ function RelatedActions({ info, instance, authenticated }) {
|
||||||
|
|
||||||
if (currentAccount === currentID) {
|
if (currentAccount === currentID) {
|
||||||
// It's myself!
|
// It's myself!
|
||||||
|
setIsSelf(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,7 +545,7 @@ function RelatedActions({ info, instance, authenticated }) {
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{currentAuthenticated && (
|
{currentAuthenticated && !isSelf && (
|
||||||
<>
|
<>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue