Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3359693
D11574.id38892.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11574.id38892.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 10:25 AM (18 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578951
Default Alt Text
D11574.id38892.diff (2 KB)
Attached To
Mode
D11574: [web/native] improve rendering Tunnelbroker messages
Attached
Detach File
Event Timeline
Log In to Comment