feat(qzone): add QQ space message publishing and image upload (#1965)

- Add QzonePublishResponse interface and parsing logic for publish API responses
- Add buildQzonePublishBody function to construct publish request parameters
- Add buildQzoneUploadImageBody function to construct image upload request parameters
- Add parseQzoneUploadImageResponseText function to parse upload API responses
- Add toQzoneRichval function to format image data for publish requests
- Add publishQzoneMsg method to NTQQWebApi for publishing space messages with optional images
- Add uploadImageToQzone method to NTQQWebApi for uploading images to QQ space
- Add getQzoneAuth private method to retrieve authentication tokens (skey, pskey, g_tk)
- Add SendQzoneMsg action handler to expose QQ space publishing via OneBot API
- Add comprehensive unit tests for all Qzone data construction and parsing functions
- Update action router to register SendQzoneMsg action
- Update action examples to demonstrate Qzone publishing usage
This commit is contained in:
Airline233 authored and GitHub committed 2026-07-20 20:30:17 +08:00
1 parent 216d0c7c6b
commit 288cc7c54f
7 files changed
+400

No files matched your search

+2
View File
@@ -160,6 +160,7 @@ import { RefuseOnlineFile } from './file/online/RefuseOnlineFile';
import { GetFilesetId } from './file/flash/GetFilesetIdByCode';
import { FetchPttText } from '@/napcat-onebot/action/msg/FetchPttText';
import { GetGroupSignedList } from './extends/GetGroupSignedList';
import { SendQzoneMsg } from './extends/SendQzoneMsg';
export function getAllHandlers (obContext: NapCatOneBot11Adapter, core: NapCatCore) {
const actionHandlers = [
@@ -216,6 +217,7 @@ export function getAllHandlers (obContext: NapCatOneBot11Adapter, core: NapCatCo
new RenameGroupFile(obContext, core),
new TransGroupFile(obContext, core),
new GetGroupSignedList(obContext, core),
new SendQzoneMsg(obContext, core),
// onebot11
new SendLike(obContext, core),
new GetMsg(obContext, core),