Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function friendshipRawPayloadParserVerify (
rawPayload: PadplusMessagePayload,
): FriendshipPayload {
const payload: FriendshipPayloadVerify = {
contactId : rawPayload.fromUserName,
id : rawPayload.msgId,
timestamp : rawPayload.createTime,
type : FriendshipType.Verify,
}
return payload
}
function friendshipRawPayloadParserVerify(
rawPayload: PadchatMessagePayload,
): FriendshipPayload {
const payload: FriendshipPayloadVerify = {
id : rawPayload.msg_id,
contactId : rawPayload.from_user,
type : FriendshipType.Verify,
}
return payload
}