修复web接口会显示两次上舰消息的问题

This commit is contained in:
John Smith
2025-11-30 17:48:36 +08:00
parent 1d53a12549
commit 0cc0090869
4 changed files with 10 additions and 2 deletions

Submodule blivedm updated: 8f6179ee17...8bf5055fcb

View File

@@ -1,6 +1,6 @@
{ {
"name": "blivechat", "name": "blivechat",
"version": "1.10.1", "version": "1.10.2-beta",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",

View File

@@ -173,6 +173,11 @@ export default class ChatClientDirectWeb extends ChatClientOfficialBase {
async userToastV2Callback(command) { async userToastV2Callback(command) {
let data = command.data let data = command.data
// 官方的评论栏不会显示2的消息
if (data.option.source == 2) {
return
}
let { let {
sender_uinfo: { sender_uinfo: {
uid, uid,

View File

@@ -612,6 +612,9 @@ class LiveMsgHandler(blivedm.BaseHandler):
) )
def _on_user_toast_v2(self, client: WebLiveClient, message: dm_web_models.UserToastV2Message): def _on_user_toast_v2(self, client: WebLiveClient, message: dm_web_models.UserToastV2Message):
# 官方的评论栏不会显示2的消息
if message.source == 2:
return
utils.async_io.create_task_with_ref(self.__on_buy_guard(client, message)) utils.async_io.create_task_with_ref(self.__on_buy_guard(client, message))
@staticmethod @staticmethod