summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_mam.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_mam.cpp')
-rw-r--r--protocols/JabberG/src/jabber_mam.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/protocols/JabberG/src/jabber_mam.cpp b/protocols/JabberG/src/jabber_mam.cpp
index 0e29619eed..43e80d76b8 100644
--- a/protocols/JabberG/src/jabber_mam.cpp
+++ b/protocols/JabberG/src/jabber_mam.cpp
@@ -29,17 +29,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void CJabberProto::OnIqResultMamInfo(const TiXmlElement *iqNode, CJabberIqInfo *pInfo)
{
- if (pInfo->GetIqType() != JABBER_IQ_TYPE_RESULT)
- return;
+ if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) {
+ if (auto *n = XmlFirstChild(iqNode, "prefs")) {
+ m_bMamPrefsAvailable = true;
- if (auto *n = XmlFirstChild(iqNode, "prefs")) {
- if (auto *type = n->Attribute("default")) {
- if (!strcmp(type, "never"))
- m_iMamMode = 0;
- else if (!strcmp(type, "roster"))
- m_iMamMode = 1;
- else
- m_iMamMode = 2;
+ if (auto *type = n->Attribute("default")) {
+ if (!strcmp(type, "never"))
+ m_iMamMode = 0;
+ else if (!strcmp(type, "roster"))
+ m_iMamMode = 1;
+ else
+ m_iMamMode = 2;
+ }
}
}