mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
xmpp: Revert part of 9c39e3 and fix code at the right place
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
d52ace59a9
commit
552848b3ed
1 changed files with 2 additions and 2 deletions
|
@ -288,7 +288,7 @@ impl Agent {
|
||||||
.clone()
|
.clone()
|
||||||
.unwrap_or_else(|| self.client.bound_jid().unwrap().clone());
|
.unwrap_or_else(|| self.client.bound_jid().unwrap().clone());
|
||||||
if let IqType::Get(payload) = iq.payload {
|
if let IqType::Get(payload) = iq.payload {
|
||||||
if MucUser::try_from(payload.clone()).is_ok() {
|
if payload.is("query", ns::DISCO_INFO) {
|
||||||
let query = DiscoInfoQuery::try_from(payload);
|
let query = DiscoInfoQuery::try_from(payload);
|
||||||
match query {
|
match query {
|
||||||
Ok(query) => {
|
Ok(query) => {
|
||||||
|
@ -381,7 +381,7 @@ impl Agent {
|
||||||
let mut found_special_message = false;
|
let mut found_special_message = false;
|
||||||
|
|
||||||
for payload in &message.payloads {
|
for payload in &message.payloads {
|
||||||
if payload.is("x", xmpp_parsers::ns::MUC_USER) {
|
if let Ok(_) = MucUser::try_from(payload.clone()) {
|
||||||
let event = match from.clone() {
|
let event = match from.clone() {
|
||||||
Jid::Bare(bare) => {
|
Jid::Bare(bare) => {
|
||||||
// TODO: Can a service message be of type Chat/Normal and not Groupchat?
|
// TODO: Can a service message be of type Chat/Normal and not Groupchat?
|
||||||
|
|
Loading…
Reference in a new issue