Skip to content
This repository was archived by the owner on Jun 16, 2023. It is now read-only.

Commit aa4b51e

Browse files
custom status issue fixed
1 parent 3db7117 commit aa4b51e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/app/organisms/navigation/ProfileAvatarMenu.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { colorMXID } from '../../../util/colorMXID';
1111

1212
import initMatrix from '../../../client/initMatrix';
1313
import { tabText as settingTabText } from '../settings/Settings';
14-
import { getUserStatus, updateUserStatusIcon } from '../../../util/onlineStatus';
14+
import { getUserStatus } from '../../../util/onlineStatus';
1515

1616
import {
1717
openSettings,
@@ -60,6 +60,8 @@ function ProfileAvatarMenu() {
6060

6161
if (customStatusRef && customStatusRef.current && typeof event.msg === 'string' && event.msg.length > 0) {
6262
customStatusRef.current.innerHTML = ReactDOMServer.renderToStaticMarkup(twemojify(event.msg.substring(0, 100)));
63+
} else {
64+
customStatusRef.current.innerHTML = ReactDOMServer.renderToStaticMarkup(twemojify(user.userId));
6365
}
6466

6567
if (statusRef && statusRef.current && typeof event.status === 'string' && event.status.length > 0) {

src/app/organisms/settings/Settings.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,9 @@ function ProfileSection() {
379379
if (typeof value === 'string' && value.length > 0) {
380380
setCustomStatus(value);
381381
userProfile.msg = value;
382+
} else {
383+
setCustomStatus(null);
384+
userProfile.msg = null;
382385
}
383386

384387
initMatrix.matrixClient.setAccountData('pony.house.profile', userProfile);

0 commit comments

Comments
 (0)