Replies: 1 comment
-
|
had to write this code: const processMessageBody = (message: Message): string => {
if (message.type === MessageType.CHAT) return coerce(message.body);
if (message.type === MessageType.VCARD) return removePhotoFromVcard(coerce(message.body));
if (message.type === MessageType.MULTI_VCARD) {
// @ts-expect-error typing are not up to date.
return message.vcardList.map(({ vcard }) => removePhotoFromVcard(vcard))
.join("\n");
}
return `user sent an unsupported message type (${message.type})`;
};seems like the typing is outdated |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
User sends a vcard (or a few)
I can't find the string itself. It doesn't seem to be in
message.bodyormessage.contentBeta Was this translation helpful? Give feedback.
All reactions