You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/types.rs
+97-14Lines changed: 97 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
1
use std::sync::Arc;
2
2
3
-
use pyo3::{PyErr,PyResult,Python, exceptions::{PyException,PyRuntimeError}, ffi::PyObject, pyclass, pymethods, types::PyDateTime};
3
+
use pyo3::{PyErr,PyResult,Python, exceptions::{PyException,PyRuntimeError}, ffi::PyObject, pyclass, pymethods, types::{PyBytes,PyDateTime}};
4
4
use whatsapp_rust::{JidasWhatsAppJID};
5
-
use wacore::types::message::{EditAttribute,MessageInfoasWhatsAppMessageInfo,MessageSourceasWhatsAppMessageSource,MsgBotInfoasWhatsAppMsgBotInfo,BotEditType};
5
+
use wacore::types::message::{BotEditType,EditAttribute,MessageInfoasWhatsAppMessageInfo,MessageSourceasWhatsAppMessageSource,MsgBotInfoasWhatsAppMsgBotInfo,MsgMetaInfoasWhatsappMsgMetaInfo};
6
+
use prost::Message;
6
7
#[pyclass]
7
8
pubstructJID{
8
9
inner:Arc<WhatsAppJID>,
@@ -80,16 +81,7 @@ impl MessageSource {
80
81
}
81
82
82
83
83
-
#[pyclass]
84
-
structMessageInfo{
85
-
inner:Arc<WhatsAppMessageInfo>,
86
-
#[pyo3(get)]
87
-
id:String,
88
-
#[pyo3(get)]
89
-
r#type:String,
90
-
#[pyo3(get)]
91
-
push_name:String,
92
-
}
84
+
93
85
#[pyclass]
94
86
structMsgBotInfo{
95
87
inner:Arc<WhatsAppMsgBotInfo>,
@@ -98,6 +90,7 @@ struct MsgBotInfo {
98
90
}
99
91
#[pymethods]
100
92
implMsgBotInfo{
93
+
#[getter]
101
94
fnedit_type(&self) -> Option<&str>{
102
95
self.inner.edit_type.as_ref().map(|edit_type| match edit_type {
0 commit comments