// 0x912F_0 — clear the remark (备注) stored for a friend. Current QQ // uses a separate StrangerRemarkSetWorker command instead of sending an // empty string through 0x912E_0. import { protobuf_decode, protobuf_encode } from '@snowluma/proton'; import type { OidbBase, OidbEmpty } from '@snowluma/proto-defs/oidb'; import type { OidbClearFriendRemark } from '@snowluma/proto-defs/oidb-actions/base'; import { invokeOidb, type OidbSender } from '../../oidb-service'; import type { BridgeContext } from '../../bridge-context'; export namespace ClearFriendRemark { export const command = 0x912f; export const subCommand = 0; export interface Params { userId: number; } export type Deps = OidbSender & Pick; export const serialize = async (ctx: Deps, p: Params): Promise => ({ target: { targetUid: await ctx.resolveUserUid(p.userId) }, }); export const deserialize = (_ctx: Deps, _: OidbEmpty): void => {}; export const encode = (env: OidbBase): Uint8Array => protobuf_encode>(env); export const decode = (bytes: Uint8Array): OidbBase => protobuf_decode>(bytes); export const invoke = (deps: Deps, params: Params): Promise => invokeOidb(deps, ClearFriendRemark, params); }