1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00

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();

View File

@ -69,6 +69,7 @@
#define XMPP_FEATURE_PUBSUB_PUBLISH_OPTIONS "http://jabber.org/protocol/pubsub#publish-options"
#define XMPP_FEATURE_USER_AVATAR_METADATA_NOTIFY "urn:xmpp:avatar:metadata+notify"
#define XMPP_FEATURE_LAST_MESSAGE_CORRECTION "urn:xmpp:message-correct:0"
#define XMPP_FEATURE_MAM2 "urn:xmpp:mam:2"
typedef enum {
JABBER_CONNECTING,