修复:集成聊天图片预览与真实尺寸发送

This commit is contained in:
Christ committed 2026-08-18 15:08:37 +08:00
1 parent 9eb6be2875
commit ee228381cf
36 files changed
+331 -83

No files matched your search

+3 -2
View File
@@ -878,8 +878,9 @@ func (a *Account) MarkChatRead(ctx context.Context, chatID string, messageIDs []
}
// SendImage 通过当前 WebSocket 给买家发送图片消息。当前仅支持可直接访问的 CDN/公网 URL。
func (a *Account) SendImage(ctx context.Context, chatID, toUserID, imageURL string, cardID int64) error {
return a.outgoing.sendImage(ctx, chatID, toUserID, imageURL, cardID)
// width/height 为图片真实尺寸,单位为像素;传入非正值时由 WebSocket 使用默认尺寸。
func (a *Account) SendImage(ctx context.Context, chatID, toUserID, imageURL string, cardID int64, width, height int) error {
return a.outgoing.sendImage(ctx, chatID, toUserID, imageURL, cardID, width, height)
}
// FetchChatHistory reuses the account's registered IM connection. Keeping this