Implement Event::RoomSubject for room subject changes/retrieve
This commit is contained in:
parent
51f2462772
commit
4f8ce0a953
2 changed files with 10 additions and 0 deletions
|
|
@ -15,6 +15,11 @@ pub async fn handle_message_group_chat(
|
|||
message: &Message,
|
||||
) {
|
||||
let langs: Vec<&str> = agent.lang.iter().map(String::as_str).collect();
|
||||
|
||||
if let Some((_lang, subject)) = message.get_best_subject(langs.clone()) {
|
||||
events.push(Event::RoomSubject(from.to_bare(), from.resource_str().map(String::from), subject.0.clone()));
|
||||
}
|
||||
|
||||
if let Some((_lang, body)) = message.get_best_body(langs) {
|
||||
let event = match from.clone() {
|
||||
Jid::Full(full) => Event::RoomMessage(
|
||||
|
|
|
|||
Loading…
Reference in a new issue