Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F4933021
D12955.id43014.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12955.id43014.diff
View Options
diff --git a/lib/handlers/tunnelbroker-device-token-handler.react.js b/lib/handlers/tunnelbroker-device-token-handler.react.js
--- a/lib/handlers/tunnelbroker-device-token-handler.react.js
+++ b/lib/handlers/tunnelbroker-device-token-handler.react.js
@@ -6,8 +6,9 @@
import { useTunnelbroker } from '../tunnelbroker/tunnelbroker-context.js';
import {
messageToTunnelbrokerTypes,
- type SetDeviceToken,
+ type SetDeviceTokenWithPlatform,
} from '../types/tunnelbroker/message-to-tunnelbroker-types.js';
+import { getConfig } from '../utils/config.js';
import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
@@ -20,6 +21,8 @@
const { socketState, sendMessageToTunnelbroker } = useTunnelbroker();
React.useEffect(() => {
+ const { platform } = getConfig().platformDetails;
+
if (
!socketState.isAuthorized ||
!tunnelbrokerDeviceToken.localToken ||
@@ -29,9 +32,10 @@
return;
}
- const message: SetDeviceToken = {
- type: messageToTunnelbrokerTypes.SET_DEVICE_TOKEN,
+ const message: SetDeviceTokenWithPlatform = {
+ type: messageToTunnelbrokerTypes.SET_DEVICE_TOKEN_WITH_PLATFORM,
deviceToken: tunnelbrokerDeviceToken.localToken,
+ platform,
};
const deviceToken = tunnelbrokerDeviceToken.localToken;
const promise: Promise<{ deviceToken: string }> = (async () => {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 3:37 PM (4 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3350962
Default Alt Text
D12955.id43014.diff (1 KB)
Attached To
Mode
D12955: [lib] start using `SetDeviceTokenWithPlatform`
Attached
Detach File
Event Timeline
Log In to Comment