diff --git a/native/profile/tunnelbroker-menu.react.js b/native/profile/tunnelbroker-menu.react.js --- a/native/profile/tunnelbroker-menu.react.js +++ b/native/profile/tunnelbroker-menu.react.js @@ -7,7 +7,10 @@ import { IdentityClientContext } from 'lib/shared/identity-client-context.js'; import { useTunnelbroker } from 'lib/tunnelbroker/tunnelbroker-context.js'; -import type { TunnelbrokerMessage } from 'lib/types/tunnelbroker/messages.js'; +import { + tunnelbrokerMessageTypes, + type TunnelbrokerMessage, +} from 'lib/types/tunnelbroker/messages.js'; import { type EncryptedMessage, peerToPeerMessageTypes, @@ -194,11 +197,13 @@ MESSAGES - {messages.map(msg => ( - - {JSON.stringify(msg)} - - ))} + {messages + .filter(msg => msg.type !== tunnelbrokerMessageTypes.HEARTBEAT) + .map((msg, id) => ( + + {JSON.stringify(msg)} + + ))} ); } diff --git a/web/settings/tunnelbroker-message-list.react.js b/web/settings/tunnelbroker-message-list.react.js --- a/web/settings/tunnelbroker-message-list.react.js +++ b/web/settings/tunnelbroker-message-list.react.js @@ -3,7 +3,10 @@ import * as React from 'react'; import type { TunnelbrokerSocketListener } from 'lib/tunnelbroker/tunnelbroker-context.js'; -import type { TunnelbrokerMessage } from 'lib/types/tunnelbroker/messages.js'; +import { + tunnelbrokerMessageTypes, + type TunnelbrokerMessage, +} from 'lib/types/tunnelbroker/messages.js'; import css from './tunnelbroker-message-list.css'; import Modal from '../modals/modal.react.js'; @@ -33,11 +36,13 @@ ); if (messages.length) { - messageList = messages.map(message => ( -
-
{JSON.stringify(message)}
-
- )); + messageList = messages + .filter(message => message.type !== tunnelbrokerMessageTypes.HEARTBEAT) + .map((message, id) => ( +
+
{JSON.stringify(message)}
+
+ )); } return (