Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulclindo committed Nov 7, 2023
1 parent 2728e45 commit 995d0ad
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libs/shinkai-message-ts/src/api/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ export const sendTextMessageWithInbox = async (
headers: { 'Content-Type': 'application/json' },
});
await handleHttpError(response);
// if (message.body && 'unencrypted' in message.body) {
// const inboxId = message.body.unencrypted.internal_metadata.inbox;
// return { inboxId, message };
// } else {
// throw new Error('message body is null or encrypted');
// }
if (message.body && 'unencrypted' in message.body) {
const inboxId = message.body.unencrypted.internal_metadata.inbox;
return { inboxId, message };
} else {
throw new Error('message body is null or encrypted');
}
} catch (error) {
console.error('Error sending text message:', error);
throw error;
Expand Down

0 comments on commit 995d0ad

Please sign in to comment.