Add get_profile_info which gets name, description and image
This commit is contained in:
parent
0055a1ed65
commit
8620e17810
|
@ -320,11 +320,10 @@ impl Sbot {
|
||||||
// these are the about message keys we are looking for
|
// these are the about message keys we are looking for
|
||||||
// as we find values for each of these keys,
|
// as we find values for each of these keys,
|
||||||
// we will remove them from this vector (as we are no longer searching for them)
|
// we will remove them from this vector (as we are no longer searching for them)
|
||||||
let mut keys_to_search_for = vec!["name", "description", "profile"];
|
let mut keys_to_search_for = vec!["name", "description", "image"];
|
||||||
// iterate through the stream while it still has more values and
|
// iterate through the stream while it still has more values and
|
||||||
// we still have keys we are looking for
|
// we still have keys we are looking for
|
||||||
while let Some(res) = about_message_stream.next().await {
|
while let Some(res) = about_message_stream.next().await {
|
||||||
println!("res: {:?}", res);
|
|
||||||
// if there are no more keys we are looking for, then we are done
|
// if there are no more keys we are looking for, then we are done
|
||||||
if keys_to_search_for.len() == 0 {
|
if keys_to_search_for.len() == 0 {
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue