diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-01-28 13:55:47 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2021-01-28 14:44:53 +0100 |
commit | 6e1e01dbb8476899efdd3d4a169f821c8e388ad5 (patch) | |
tree | 96bd6e1b9082774eef9f4d963a1316c763a5de65 | |
parent | db65255a5a3c39dd7ad70b45c3610ec4fb02aac8 (diff) | |
download | profani-tty-6e1e01dbb8476899efdd3d4a169f821c8e388ad5.tar.gz |
Adapt MAM RSM code to latest functions
Some functions changed in the meantime. stanza_get_child_by_name_and_ns() got dropped and xmpp_stanza_get_child_by_name_and_ns() from newer libstrophe is used.
-rw-r--r-- | src/xmpp/iq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index f1665616..e7648251 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -2555,7 +2555,7 @@ iq_mam_request(ProfChatWin* win) GDateTime* timestamp = g_date_time_add_days(now, -1); g_date_time_unref(now); gchar* datestr = g_date_time_format(timestamp, "%FT%TZ"); - xmpp_stanza_t* iq = stanza_create_mam_iq(ctx, win->barejid, datestr); + xmpp_stanza_t* iq = stanza_create_mam_iq(ctx, win->barejid, datestr, NULL); iq_id_handler_add(xmpp_stanza_get_id(iq), _mam_rsm_id_handler, NULL, g_strdup(datestr)); @@ -2581,9 +2581,9 @@ _mam_rsm_id_handler(xmpp_stanza_t* const stanza, void* const userdata) free(error_message); */ } else if (g_strcmp0(type, "result") == 0) { - xmpp_stanza_t* fin = stanza_get_child_by_name_and_ns(stanza, STANZA_NAME_FIN, STANZA_NS_MAM2); + xmpp_stanza_t* fin = xmpp_stanza_get_child_by_name_and_ns(stanza, STANZA_NAME_FIN, STANZA_NS_MAM2); if (fin) { - xmpp_stanza_t* set = stanza_get_child_by_name_and_ns(fin, STANZA_TYPE_SET, STANZA_NS_RSM); + xmpp_stanza_t* set = xmpp_stanza_get_child_by_name_and_ns(fin, STANZA_TYPE_SET, STANZA_NS_RSM); if (set) { xmpp_stanza_t* last = xmpp_stanza_get_child_by_name(set, STANZA_NAME_LAST); char* lastid = xmpp_stanza_get_text(last); |