Standardize and reorganize imports, type usages and minor formatting across the bridge modules. This commit moves protobuf helpers, makeOidbEnvelope/runOidb, OidbBase and logger imports into consistent places, reorders and groups action/contacts exports in Bridge, removes or trims file-level comments, and fixes whitespace/logic ordering in several highway, element-builder and msg-push files. These are refactors and import/type adjustments across many files under packages/core/src (bridge, highway, msg-push, webui, utils, etc.) with no intended behavioral changes.
28 lines
895 B
TypeScript
28 lines
895 B
TypeScript
import type { Bridge } from '../bridge';
|
|
import { getGroupAlbumList, uploadImageToGroupAlbum } from '../web/group-album';
|
|
import { getCookies } from './cookies';
|
|
|
|
export async function getGroupAlbumListWeb(bridge: Bridge, groupId: number) {
|
|
const groupCode = groupId.toString();
|
|
const uin = bridge.identity.uin;
|
|
const cookieObject = await getCookies(bridge, 'qzone.qq.com');
|
|
|
|
const albumData = await getGroupAlbumList(cookieObject, groupCode, uin);
|
|
|
|
return albumData?.album || [];
|
|
}
|
|
|
|
export async function uploadImageToGroupAlbumWeb(
|
|
bridge: Bridge,
|
|
groupId: number,
|
|
albumId: string,
|
|
albumName: string,
|
|
filePath: string
|
|
): Promise<void> {
|
|
const groupCode = groupId.toString();
|
|
const uin = bridge.identity.uin;
|
|
const cookieObject = await getCookies(bridge, 'qzone.qq.com');
|
|
|
|
await uploadImageToGroupAlbum(cookieObject, groupCode, albumId, albumName, filePath, uin);
|
|
}
|