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

Commit 1fb2244

Browse files
offline filter
1 parent d305eb8 commit 1fb2244

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/app/molecules/people-selector/PeopleSelector.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ function PeopleSelector({
2626
// Get Status
2727
const customStatus = customStatusRef.current;
2828

29-
if (content && content.presenceStatusMsg && typeof content.presenceStatusMsg.msg === 'string' && content.presenceStatusMsg.msg.length > 0) {
29+
if (
30+
content && content.presenceStatusMsg &&
31+
content.presenceStatusMsg.status !== 'offline' && content.presenceStatusMsg.status !== 'unavailable' &&
32+
typeof content.presenceStatusMsg.msg === 'string' && content.presenceStatusMsg.msg.length > 0
33+
) {
3034
customStatus.innerHTML = ReactDOMServer.renderToStaticMarkup(twemojify(content.presenceStatusMsg.msg.substring(0, 100), undefined, true, false, true));
3135
} else {
3236
customStatus.innerHTML = '';

src/app/organisms/profile-viewer/ProfileViewer.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,10 @@ function ProfileViewer() {
415415
const customStatusDOM = customStatusRef.current;
416416
if (customStatusDOM) {
417417
customStatusDOM.classList.remove('d-none');
418-
if (typeof content.presenceStatusMsg.msg === 'string' && content.presenceStatusMsg.msg.length > 0) {
418+
if (
419+
content.presenceStatusMsg.status !== 'offline' && content.presenceStatusMsg.status !== 'unavailable' &&
420+
typeof content.presenceStatusMsg.msg === 'string' && content.presenceStatusMsg.msg.length > 0
421+
) {
419422
customStatusDOM.innerHTML = ReactDOMServer.renderToStaticMarkup(twemojify(content.presenceStatusMsg.msg.substring(0, 100), undefined, true, false, true));
420423
} else {
421424
customStatusDOM.classList.add('d-none');

0 commit comments

Comments
 (0)