Page MenuHomePhabricator

D11574.diff
No OneTemporary

D11574.diff

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 @@
</View>
<Text style={styles.header}>MESSAGES</Text>
- {messages.map(msg => (
- <View key={msg.messageID} style={styles.section}>
- <Text style={styles.submenuText}>{JSON.stringify(msg)}</Text>
- </View>
- ))}
+ {messages
+ .filter(msg => msg.type !== tunnelbrokerMessageTypes.HEARTBEAT)
+ .map((msg, id) => (
+ <View key={id} style={styles.section}>
+ <Text style={styles.submenuText}>{JSON.stringify(msg)}</Text>
+ </View>
+ ))}
</ScrollView>
);
}
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 @@
</div>
);
if (messages.length) {
- messageList = messages.map(message => (
- <div key={message.messageID} className={css.messageRow}>
- <div className={css.messageCol}>{JSON.stringify(message)}</div>
- </div>
- ));
+ messageList = messages
+ .filter(message => message.type !== tunnelbrokerMessageTypes.HEARTBEAT)
+ .map((message, id) => (
+ <div key={id} className={css.messageRow}>
+ <div className={css.messageCol}>{JSON.stringify(message)}</div>
+ </div>
+ ));
}
return (

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 7:43 AM (22 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578951
Default Alt Text
D11574.diff (2 KB)

Event Timeline