Add protobuf_decode import to interaction actions
Import protobuf_decode from @snowluma/proton in packages/core/src/bridge/actions/interaction.ts to enable decoding of protobuf messages within interaction-related bridge actions. No other changes to logic in this diff.
This commit is contained in:
1 parent
bf4c130641
commit
02bab710b8
2 files changed
+2
-2
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
// and the related read-side "who reacted with X" query. None of these
|
// and the related read-side "who reacted with X" query. None of these
|
||||||
// edit message content — they're purely social signals.
|
// edit message content — they're purely social signals.
|
||||||
|
|
||||||
import { protobuf_encode } from '@snowluma/proton';
|
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||||
import type { Bridge } from '../bridge';
|
import type { Bridge } from '../bridge';
|
||||||
import { runOidb, makeOidbEnvelope } from '../bridge-oidb';
|
import { runOidb, makeOidbEnvelope } from '../bridge-oidb';
|
||||||
import type {
|
import type {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export async function forceFetchClientKey(bridge: Bridge) {
|
|||||||
export async function getPSkey(bridge: Bridge, domainList: string[]) {
|
export async function getPSkey(bridge: Bridge, domainList: string[]) {
|
||||||
const env = makeOidbEnvelope<OidbGetPskeyReq>(0x102A, 0, { domainList });
|
const env = makeOidbEnvelope<OidbGetPskeyReq>(0x102A, 0, { domainList });
|
||||||
const respBytes = await runOidb(bridge, 'OidbSvcTrpcTcp.0x102a_0', protobuf_encode<OidbBase<OidbGetPskeyReq>>(env));
|
const respBytes = await runOidb(bridge, 'OidbSvcTrpcTcp.0x102a_0', protobuf_encode<OidbBase<OidbGetPskeyReq>>(env));
|
||||||
const resp = decodeOidbEnv<OidbGetPskeyResp>(respBytes).body;
|
const resp = protobuf_decode<OidbBase<OidbGetPskeyResp>>(respBytes).body;
|
||||||
|
|
||||||
const domainPskeyMap = new Map<string, string>();
|
const domainPskeyMap = new Map<string, string>();
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user