Adding code for getting contact (#12)

Reviewed-on: #12
This commit was merged in pull request #12.
This commit is contained in:
2026-06-25 21:40:02 -04:00
parent c3f93cce3c
commit d7114942e5
5 changed files with 197 additions and 121 deletions
+15 -2
View File
@@ -51,9 +51,22 @@ impl Service {
}
};
let contacts = super::contact::Contact {
app: self.app.clone(),
token: self.token.clone(),
};
let events = events.unwrap_or_default();
for event in events {
println!("Event: {event:?}");
let contact = &match contacts.get(&event.contact_id).await {
Ok(contact) => contact,
Err(err) => {
eprintln!("Error: {err:?}");
continue;
}
}[0];
println!("Contact Id: {:?}", contact.id);
}
todo!(
@@ -69,8 +82,8 @@ impl Service {
2. If there is an item, get the data - Done
3. Evaluate if it is schedulable - Done
4. Get the events and iterate each one - Done
5. starting with the message
6. Get the contact
5. Starting with the message
6. Get the contact - Done
7. Send the message
8. Record the message event response
9. Add to scheduler