Check if server suppors MAM

This commit is contained in:
Michael Vetter
2020-04-12 00:24:00 +02:00
parent aedecee962
commit 98200ebd43
2 changed files with 6 additions and 2 deletions

View File

@@ -2503,8 +2503,11 @@ _iq_free_affiliation_list(ProfAffiliationList *affiliation_list)
void
iq_mam_request(ProfChatWin *win)
{
//TODDO: check for mam feature
//if (connection_supports(XMPP_FEATURE_PING) == FALSE) {
if (connection_supports(XMPP_FEATURE_MAM2) == FALSE) {
log_warning("Server doesn't advertise %s feature.", XMPP_FEATURE_PING);
cons_show_error("Server doesn't support MAM.");
return;
}
xmpp_ctx_t * const ctx = connection_get_ctx();
char *id = connection_create_stanza_id();