Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric committed May 27, 2023
1 parent 54880d2 commit adeda19
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ws.message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export class WsMessage {
}
const MJmsg: MJMessage = {
uri: attachments[0].url,
content: this.content2prompt(content),
content: content,
progress: this.content2progress(content),
};
const eventMsg: WsEventMsg = {
Expand Down Expand Up @@ -282,7 +282,7 @@ export class WsMessage {
hash: this.uriToHash(attachments[0].url),
progress: "done",
uri: attachments[0].url,
content: this.content2progress(content),
content: content,
};
this.filterMessages(MJmsg);
return;
Expand Down Expand Up @@ -393,6 +393,9 @@ export class WsMessage {
) {
const once = (data: WsEventMsg) => {
const { message, error } = data;
if (message) {
message.content = this.content2prompt(message.content);
}
if (error || (message && message.progress === "done")) {
this.log("onceImage", type, "done", data, error);
this.remove(type, once);
Expand Down

0 comments on commit adeda19

Please sign in to comment.