fn mp_handler(data: String, query: Query<QueryData>) -> String {
if !check_signature(
"asdfsadfa",
&query.signature,
&query.timestamp,
&query.nonce,
) {
return "error".to_string();
}
debug!("收到数据: {}", data);
let msg_data: Msg = data.try_into().unwrap();
debug!("解析数据: {:?}", msg_data);
if let Msg::TextMsg(msg) = msg_data {
let data = reply_to_xml(
Reply::Text(Text{
content:msg.content,
}),
&msg.to_user_name,
&msg.from_user_name,
).unwrap();
debug!("回复数据: {}", data);
return data;
}
"hello".to_string()
}-
Notifications
You must be signed in to change notification settings - Fork 0
noxue/mp
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
rust实现的公众号sdk
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published