FossilOrigin-Name: 89d23316a0f1f697ba17c2fa264a90ae9d729b892a7c578f91192ae1ba332eed
This commit is contained in:
nekobit 2022-10-27 15:07:20 +00:00
parent c2f859d6bd
commit eaf8771f45
14 changed files with 122 additions and 102 deletions

View file

@ -104,7 +104,7 @@ static char* account_followers_cb(HV* session_hv,
.with_relationships = 0,
};
mstdnt_get_followers(api, &m_args, acct->id, &args, &storage, &accounts, &accts_len);
mstdnt_get_followers(api, &m_args, NULL, NULL, acct->id, &args, &storage, &accounts, &accts_len);
return accounts_page(session_hv, api, acct, rel, NULL, &storage, accounts, accts_len);
}
@ -132,7 +132,7 @@ static char* account_following_cb(HV* session_hv,
.with_relationships = 0,
};
mstdnt_get_following(api, &m_args, acct->id, &args, &storage, &accounts, &accts_len);
mstdnt_get_following(api, &m_args, NULL, NULL, acct->id, &args, &storage, &accounts, &accts_len);
return accounts_page(session_hv, api, acct, rel, NULL, &storage, accounts, accts_len);
}
@ -153,7 +153,7 @@ static char* account_statuses_cb(HV* session_hv,
size_t statuses_len = 0;
char* result;
mstdnt_get_account_statuses(api, &m_args, acct->id, args, &storage, &statuses, &statuses_len);
mstdnt_get_account_statuses(api, &m_args, NULL, NULL, acct->id, args, &storage, &statuses, &statuses_len);
PERL_STACK_INIT;
XPUSHs(newRV_noinc((SV*)session_hv));
@ -198,7 +198,7 @@ static char* account_scrobbles_cb(HV* session_hv,
.offset = 0,
.limit = 20
};
mstdnt_get_scrobbles(api, &m_args, acct->id, &args, &storage, &scrobbles, &scrobbles_len);
mstdnt_get_scrobbles(api, &m_args, NULL, NULL, acct->id, &args, &storage, &scrobbles, &scrobbles_len);
PERL_STACK_INIT;
XPUSHs(newRV_noinc((SV*)session_hv));
@ -224,7 +224,7 @@ void get_account_info(mastodont_t* api, struct session* ssn)
{
struct mstdnt_args m_args;
set_mstdnt_args(&m_args, ssn);
if (ssn->cookies.access_token.is_set && mstdnt_verify_credentials(api, &m_args, &(ssn->acct), &(ssn->acct_storage)) == 0)
if (ssn->cookies.access_token.is_set && mstdnt_verify_credentials(api, &m_args, NULL, NULL, &(ssn->acct), &(ssn->acct_storage)) == 0)
{
ssn->logged_in = 1;
}
@ -261,9 +261,9 @@ static void fetch_account_page(FCGX_Request* req,
int lookup_type = config_experimental_lookup ? MSTDNT_LOOKUP_ACCT : MSTDNT_LOOKUP_ID;
mstdnt_get_account(api, &m_args, lookup_type, id, &acct, &storage);
mstdnt_get_account(api, &m_args, NULL, NULL, lookup_type, id, &acct, &storage);
// Relationships may fail
mstdnt_get_relationships(api, &m_args, &(acct.id), 1, &relations_storage, &relationships, &relationships_len);
mstdnt_get_relationships(api, &m_args, NULL, NULL, &(acct.id), 1, &relations_storage, &relationships, &relationships_len);
HV* session_hv = perlify_session(ssn);
@ -367,21 +367,21 @@ void content_account_action(PATH_ARGS)
struct mstdnt_relationship acct = { 0 };
if (strcmp(data[1], "follow") == 0)
mstdnt_follow_account(api, &m_args, data[0], &storage, &acct);
mstdnt_follow_account(api, &m_args, NULL, NULL, data[0], &storage, &acct);
else if (strcmp(data[1], "unfollow") == 0)
mstdnt_unfollow_account(api, &m_args, data[0], &storage, &acct);
mstdnt_unfollow_account(api, &m_args, NULL, NULL, data[0], &storage, &acct);
else if (strcmp(data[1], "mute") == 0)
mstdnt_mute_account(api, &m_args, data[0], &storage, &acct);
mstdnt_mute_account(api, &m_args, NULL, NULL, data[0], &storage, &acct);
else if (strcmp(data[1], "unmute") == 0)
mstdnt_unmute_account(api, &m_args, data[0], &storage, &acct);
mstdnt_unmute_account(api, &m_args, NULL, NULL, data[0], &storage, &acct);
else if (strcmp(data[1], "block") == 0)
mstdnt_block_account(api, &m_args, data[0], &storage, &acct);
mstdnt_block_account(api, &m_args, NULL, NULL, data[0], &storage, &acct);
else if (strcmp(data[1], "unblock") == 0)
mstdnt_unblock_account(api, &m_args, data[0], &storage, &acct);
mstdnt_unblock_account(api, &m_args, NULL, NULL, data[0], &storage, &acct);
else if (strcmp(data[1], "subscribe") == 0)
mstdnt_subscribe_account(api, &m_args, data[0], &storage, &acct);
mstdnt_subscribe_account(api, &m_args, NULL, NULL, data[0], &storage, &acct);
else if (strcmp(data[1], "unsubscribe") == 0)
mstdnt_unsubscribe_account(api, &m_args, data[0], &storage, &acct);
mstdnt_unsubscribe_account(api, &m_args, NULL, NULL, data[0], &storage, &acct);
mstdnt_storage_cleanup(&storage);
@ -402,7 +402,7 @@ void content_account_bookmarks(PATH_ARGS)
struct mstdnt_args m_args;
set_mstdnt_args(&m_args, ssn);
mstdnt_get_bookmarks(api, &m_args, &args, &storage, &statuses, &statuses_len);
mstdnt_get_bookmarks(api, &m_args, NULL, NULL, &args, &storage, &statuses, &statuses_len);
content_timeline(req, ssn, api, &storage, statuses, statuses_len, BASE_CAT_BOOKMARKS, "Bookmarks", 0, 1);
}
@ -423,7 +423,7 @@ void content_account_blocked(PATH_ARGS)
struct mstdnt_args m_args;
set_mstdnt_args(&m_args, ssn);
mstdnt_get_blocks(api, &m_args, &args, &storage, &accts, &accts_len);
mstdnt_get_blocks(api, &m_args, NULL, NULL, &args, &storage, &accts, &accts_len);
HV* session_hv = perlify_session(ssn);
char* result = accounts_page(session_hv, api, NULL, NULL, "Blocked users", &storage, accts, accts_len);
@ -455,7 +455,7 @@ void content_account_muted(PATH_ARGS)
struct mstdnt_args m_args;
set_mstdnt_args(&m_args, ssn);
mstdnt_get_mutes(api, &m_args, &args, &storage, &accts, &accts_len);
mstdnt_get_mutes(api, &m_args, NULL, NULL, &args, &storage, &accts, &accts_len);
HV* session_hv = perlify_session(ssn);
char* result = accounts_page(session_hv, api, NULL, NULL, "Muted users", &storage, accts, accts_len);
@ -484,7 +484,7 @@ void content_account_favourites(PATH_ARGS)
.limit = 20,
};
mstdnt_get_favourites(api, &m_args, &args, &storage, &statuses, &statuses_len);
mstdnt_get_favourites(api, &m_args, NULL, NULL, &args, &storage, &statuses, &statuses_len);
content_timeline(req, ssn, api, &storage, statuses, statuses_len, BASE_CAT_BOOKMARKS, "Favorites", 0, 1);
}

View file

@ -65,10 +65,11 @@ int try_upload_media(struct mstdnt_storage** storage,
};
if (mstdnt_upload_media(api,
&m_args,
&args,
*storage + i,
*attachments + i))
&m_args,
NULL, NULL,
&args,
*storage + i,
*attachments + i))
{
for (size_t j = 0; j < i; ++j)
{

View file

@ -63,6 +63,7 @@ void render_base_page(struct base_page* page, FCGX_Request* req, struct session*
mstdnt_get_notifications(
api,
&m_args,
NULL, NULL,
&args,
&storage,
&notifs,

View file

@ -43,7 +43,7 @@ void content_chats(PATH_ARGS)
.limit = 20,
};
mstdnt_get_chats_v2(api, &m_args, &args, &storage, &chats, &chats_len);
mstdnt_get_chats_v2(api, &m_args, NULL, NULL, &args, &storage, &chats, &chats_len);
PERL_STACK_INIT;
HV* session_hv = perlify_session(ssn);
@ -93,8 +93,8 @@ void content_chat_view(PATH_ARGS)
.limit = 20,
};
mstdnt_get_chat_messages(api, &m_args, data[0], &args, &storage, &messages, &messages_len);
int chat_code = mstdnt_get_chat(api, &m_args, data[0],
mstdnt_get_chat_messages(api, &m_args, NULL, NULL, data[0], &args, &storage, &messages, &messages_len);
int chat_code = mstdnt_get_chat(api, &m_args, NULL, NULL, data[0],
&storage_chat, &chat);
PERL_STACK_INIT;

View file

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#if 0
#include "../config.h"
#include "global_cache.h"
@ -28,8 +29,8 @@ void load_instance_info_cache(mastodont_t* api)
.token = 0,
.flags = config_library_flags,
};
mstdnt_instance_panel(api, &m_args, &(g_cache.panel_html));
mstdnt_terms_of_service(api, &m_args, &(g_cache.tos_html));
mstdnt_instance_panel(api, &m_args, NULL, NULL, &(g_cache.panel_html));
mstdnt_terms_of_service(api, &m_args, NULL, NULL, &(g_cache.tos_html));
}
void free_instance_info_cache()
@ -37,3 +38,5 @@ void free_instance_info_cache()
mstdnt_fetch_results_cleanup(&(g_cache.panel_html));
mstdnt_fetch_results_cleanup(&(g_cache.tos_html));
}
#endif

View file

@ -20,6 +20,7 @@
#define GLOBAL_CACHE_H
#include <mastodont.h>
#if 0
struct global_cache
{
struct mstdnt_fetch_results tos_html;
@ -30,5 +31,6 @@ extern struct global_cache g_cache;
void load_instance_info_cache(mastodont_t* api);
void free_instance_info_cache();
#endif
#endif /* GLOBAL_CACHE_H */

View file

@ -45,11 +45,11 @@ void content_lists(PATH_ARGS)
.title = keystr(ssn->post.title),
.replies_policy = MSTDNT_LIST_REPLIES_POLICY_LIST,
};
mstdnt_create_list(api, &m_args, &args, &create_storage, NULL);
mstdnt_create_list(api, &m_args, NULL, NULL, &args, &create_storage, NULL);
mstdnt_storage_cleanup(&create_storage);
}
mstdnt_get_lists(api, &m_args, &storage, &lists, &lists_len);
mstdnt_get_lists(api, &m_args, NULL, NULL, &storage, &lists, &lists_len);
PERL_STACK_INIT;
HV* session_hv = perlify_session(ssn);
@ -93,11 +93,13 @@ void list_edit(PATH_ARGS)
};
mstdnt_update_list(api,
&m_args,
id,
&args,
&storage,
NULL);
&m_args,
NULL,
NULL,
id,
&args,
&storage,
NULL);
redirect(req, REDIRECT_303, referer);
mstdnt_storage_cleanup(&storage);

View file

@ -68,10 +68,11 @@ void content_login_oauth(PATH_ARGS)
};
if (mstdnt_obtain_oauth_token(api,
&m_args,
&args_token,
&oauth_storage,
&token) == 0)
&m_args,
NULL, NULL,
&args_token,
&oauth_storage,
&token) == 0)
{
apply_access_token(req, token.access_token);
}
@ -89,10 +90,11 @@ void content_login_oauth(PATH_ARGS)
};
if (mstdnt_register_app(api,
&m_args,
&args_app,
&storage,
&app) == 0)
&m_args,
NULL, NULL,
&args_app,
&storage,
&app) == 0)
{
char* url;
char* encode_id = curl_easy_escape(api->curl, app.client_id, 0);
@ -159,7 +161,7 @@ void content_login(PATH_ARGS)
m_args.url = config_instance_url;
}
if (mstdnt_register_app(api, &m_args, &args_app, &storage, &app) != 0)
if (mstdnt_register_app(api, &m_args, NULL, NULL, &args_app, &storage, &app) != 0)
{
// error = construct_error(oauth_store.error, E_ERROR, 1, NULL);
}
@ -176,10 +178,11 @@ void content_login(PATH_ARGS)
};
if (mstdnt_obtain_oauth_token(api,
&m_args,
&args_token,
&oauth_store,
&token) != 0 && oauth_store.error)
&m_args,
NULL, NULL,
&args_token,
&oauth_store,
&token) != 0 && oauth_store.error)
{
//error = construct_error(oauth_store.error, E_ERROR, 1, NULL);
}

View file

@ -269,7 +269,7 @@ int main(int argc, char **argv, char **env)
mastodont_t api;
mstdnt_init(&api);
// Fetch information about the current instance
load_instance_info_cache(&api);
// load_instance_info_cache(&api);
#ifndef SINGLE_THREADED
// Start thread pool
@ -289,7 +289,7 @@ int main(int argc, char **argv, char **env)
cgi_start(&api);
#endif
free_instance_info_cache();
// free_instance_info_cache();
mstdnt_global_curl_cleanup();
mstdnt_cleanup(&api);

View file

@ -54,7 +54,7 @@ void content_notifications(PATH_ARGS)
};
if (keystr(ssn->cookies.logged_in))
mstdnt_get_notifications(api, &m_args, &args, &storage, &notifs, &notifs_len);
mstdnt_get_notifications(api, &m_args, NULL, NULL, &args, &storage, &notifs, &notifs_len);
PERL_STACK_INIT;
HV* session_hv = perlify_session(ssn);
@ -107,7 +107,7 @@ void content_notifications_compact(PATH_ARGS)
.limit = 20,
};
mstdnt_get_notifications(api, &m_args, &args, &storage, &notifs, &notifs_len);
mstdnt_get_notifications(api, &m_args, NULL, NULL, &args, &storage, &notifs, &notifs_len);
}
PERL_STACK_INIT;
@ -137,10 +137,10 @@ void content_notifications_clear(PATH_ARGS)
if (data)
{
mstdnt_notification_dismiss(api, &m_args, &storage, data[0]);
mstdnt_notification_dismiss(api, &m_args, NULL, NULL, &storage, data[0]);
}
else {
mstdnt_notifications_clear(api, &m_args, &storage);
mstdnt_notifications_clear(api, &m_args, NULL, NULL, &storage);
}
mstdnt_storage_cleanup(&storage);
@ -157,11 +157,11 @@ void content_notifications_read(PATH_ARGS)
if (data)
{
struct mstdnt_notifications_args args = { .id = data[0] };
mstdnt_notifications_read(api, &m_args, &args, &storage, NULL);
mstdnt_notifications_read(api, &m_args, NULL, NULL, &args, &storage, NULL);
}
else {
struct mstdnt_notifications_args args = { .max_id = keystr(ssn->post.max_id) };
mstdnt_notifications_read(api, &m_args, &args, &storage, NULL);
mstdnt_notifications_read(api, &m_args, NULL, NULL, &args, &storage, NULL);
}
mstdnt_storage_cleanup(&storage);

View file

@ -75,7 +75,7 @@ void content_search_all(PATH_ARGS)
return;
}
mstdnt_search(api, &m_args, keystr(ssn->query.query), &storage, &args, &results);
mstdnt_search(api, &m_args, NULL, NULL, keystr(ssn->query.query), &storage, &args, &results);
PERL_STACK_INIT;
HV* session_hv = perlify_session(ssn);
@ -122,7 +122,7 @@ void content_search_statuses(PATH_ARGS)
};
struct mstdnt_search_results results = { 0 };
mstdnt_search(api, &m_args, keystr(ssn->query.query), &storage, &args, &results);
mstdnt_search(api, &m_args, NULL, NULL, keystr(ssn->query.query), &storage, &args, &results);
PERL_STACK_INIT;
HV* session_hv = perlify_session(ssn);
@ -168,7 +168,7 @@ void content_search_accounts(PATH_ARGS)
};
struct mstdnt_search_results results = { 0 };
mstdnt_search(api, &m_args, keystr(ssn->query.query), &storage, &args, &results);
mstdnt_search(api, &m_args, NULL, NULL, keystr(ssn->query.query), &storage, &args, &results);
PERL_STACK_INIT;
HV* session_hv = perlify_session(ssn);
@ -214,7 +214,7 @@ void content_search_hashtags(PATH_ARGS)
};
struct mstdnt_search_results results = { 0 };
mstdnt_search(api, &m_args, keystr(ssn->query.query), &storage, &args, &results);
mstdnt_search(api, &m_args, NULL, NULL, keystr(ssn->query.query), &storage, &args, &results);
// TODO

View file

@ -18,8 +18,8 @@
#include <stdlib.h>
#include <string.h>
#define PCRE2_CODE_UNIT_WIDTH 8
#include <pcre2.h>
/* #define PCRE2_CODE_UNIT_WIDTH 8 */
/* #include <pcre2.h> */
#include "helpers.h"
#include "http.h"
#include "base_page.h"
@ -102,7 +102,7 @@ int try_post_status(struct session* ssn, mastodont_t* api)
};
// Finally, create (no error checking)
mstdnt_create_status(api, &m_args, &args, &storage);
mstdnt_create_status(api, &m_args, NULL, NULL, &args, &storage);
mstdnt_storage_cleanup(&storage);
@ -126,7 +126,7 @@ int try_react_status(struct session* ssn, mastodont_t* api, char* id, char* emoj
struct mstdnt_storage storage = { 0 };
struct mstdnt_status status = { 0 };
mstdnt_status_emoji_react(api, &m_args, id, emoji, &storage, &status);
mstdnt_status_emoji_react(api, &m_args, NULL, NULL, id, emoji, &storage, &status);
mstdnt_cleanup_status(&status);
mstdnt_storage_cleanup(&storage);
@ -162,34 +162,35 @@ int try_interact_status(struct session* ssn, mastodont_t* api, char* id)
// Pretty up the type
if (strcmp(keystr(ssn->post.itype), "like") == 0 ||
strcmp(keystr(ssn->post.itype), "likeboost") == 0)
res = mstdnt_favourite_status(api, &m_args, id, &storage, NULL);
res = mstdnt_favourite_status(api, &m_args, NULL, NULL, id, &storage, NULL);
// Not else if because possibly a like-boost
if (strcmp(keystr(ssn->post.itype), "repeat") == 0 ||
strcmp(keystr(ssn->post.itype), "likeboost") == 0)
res = mstdnt_reblog_status(api, &m_args, id, &storage, NULL);
res = mstdnt_reblog_status(api, &m_args, NULL, NULL, id, &storage, NULL);
else if (strcmp(keystr(ssn->post.itype), "bookmark") == 0)
res = mstdnt_bookmark_status(api, &m_args, id, &storage, NULL);
res = mstdnt_bookmark_status(api, &m_args, NULL, NULL, id, &storage, NULL);
else if (strcmp(keystr(ssn->post.itype), "pin") == 0)
res = mstdnt_pin_status(api, &m_args, id, &storage, NULL);
res = mstdnt_pin_status(api, &m_args, NULL, NULL, id, &storage, NULL);
else if (strcmp(keystr(ssn->post.itype), "mute") == 0)
res = mstdnt_mute_conversation(api, &m_args, id, &storage, NULL);
res = mstdnt_mute_conversation(api, &m_args, NULL, NULL, id, &storage, NULL);
else if (strcmp(keystr(ssn->post.itype), "delete") == 0)
res = mstdnt_delete_status(api, &m_args, id, &storage, NULL);
res = mstdnt_delete_status(api, &m_args, NULL, NULL, id, &storage, NULL);
else if (strcmp(keystr(ssn->post.itype), "unlike") == 0)
res = mstdnt_unfavourite_status(api, &m_args, id, &storage, NULL);
res = mstdnt_unfavourite_status(api, &m_args, NULL, NULL, id, &storage, NULL);
else if (strcmp(keystr(ssn->post.itype), "unrepeat") == 0)
res = mstdnt_unreblog_status(api, &m_args, id, &storage, NULL);
res = mstdnt_unreblog_status(api, &m_args, NULL, NULL, id, &storage, NULL);
else if (strcmp(keystr(ssn->post.itype), "unbookmark") == 0)
res = mstdnt_unbookmark_status(api, &m_args, id, &storage, NULL);
res = mstdnt_unbookmark_status(api, &m_args, NULL, NULL, id, &storage, NULL);
else if (strcmp(keystr(ssn->post.itype), "unpin") == 0)
res = mstdnt_unpin_status(api, &m_args, id, &storage, NULL);
res = mstdnt_unpin_status(api, &m_args, NULL, NULL, id, &storage, NULL);
else if (strcmp(keystr(ssn->post.itype), "unmute") == 0)
res = mstdnt_unmute_conversation(api, &m_args, id, &storage, NULL);
res = mstdnt_unmute_conversation(api, &m_args, NULL, NULL, id, &storage, NULL);
mstdnt_storage_cleanup(&storage);
return res;
}
#if 0
char* get_in_reply_to(mastodont_t* api,
struct session* ssn,
struct mstdnt_status* status,
@ -201,20 +202,22 @@ char* get_in_reply_to(mastodont_t* api,
struct mstdnt_account acct = { 0 };
int res = mstdnt_get_account(api,
&m_args,
1,
status->in_reply_to_account_id,
&acct,
&storage);
&m_args,
NULL, NULL,
1,
status->in_reply_to_account_id,
&acct,
&storage);
char* html = "TODO";
// char* html = construct_in_reply_to(status, res == 0 ? &acct : NULL, size);
// char* html = construct_in_reply_to(status, res == 0 ? &acct : NULL, size);
if (res == 0) mstdnt_cleanup_account(&acct);
mstdnt_storage_cleanup(&storage);
return html;
}
#endif
void status_interact(PATH_ARGS)
{
@ -260,11 +263,12 @@ void status_view_reblogs(PATH_ARGS)
char* status_id = data[0];
mstdnt_status_reblogged_by(api,
&m_args,
status_id,
&storage,
&reblogs,
&reblogs_len);
&m_args,
NULL, NULL,
status_id,
&storage,
&reblogs,
&reblogs_len);
content_status_interactions(
req,
@ -288,11 +292,12 @@ void status_view_favourites(PATH_ARGS)
char* status_id = data[0];
mstdnt_status_favourited_by(api,
&m_args,
status_id,
&storage,
&favourites,
&favourites_len);
&m_args,
NULL, NULL,
status_id,
&storage,
&favourites,
&favourites_len);
content_status_interactions(
req,
@ -351,13 +356,14 @@ void content_status(PATH_ARGS, uint8_t flags)
size_t stat_before_len = 0, stat_after_len = 0;
try_post_status(ssn, api);
mstdnt_get_status(api, &m_args, data[0], &status_storage, &status);
mstdnt_get_status(api, &m_args, NULL, NULL, data[0], &status_storage, &status);
mstdnt_get_status_context(api,
&m_args,
data[0],
&storage,
&statuses_before, &statuses_after,
&stat_before_len, &stat_after_len);
&m_args,
NULL, NULL,
data[0],
&storage,
&statuses_before, &statuses_after,
&stat_before_len, &stat_after_len);
if ((flags & STATUS_EMOJI_PICKER) == STATUS_EMOJI_PICKER)
picker = construct_emoji_picker(status.id, &picker_len);

View file

@ -55,11 +55,13 @@ void content_status_react(PATH_ARGS);
// HTML Builders
// Reply to
#if 0
/** Deprecated: May be used in the future for Mastodon only */
char* get_in_reply_to(mastodont_t* api,
struct session* ssn,
struct mstdnt_status* status,
size_t* size);
#endif
void status_view_reblogs(PATH_ARGS);
void status_view_favourites(PATH_ARGS);

View file

@ -104,7 +104,7 @@ void tl_home(REQUEST_T req, struct session* ssn, mastodont_t* api, int local)
try_post_status(ssn, api);
mstdnt_timeline_home(api, &m_args, &args, &storage, &statuses, &statuses_len);
mstdnt_timeline_home(api, &m_args, NULL, NULL, &args, &storage, &statuses, &statuses_len);
content_timeline(req, ssn, api, &storage, statuses, statuses_len, BASE_CAT_HOME, NULL, 1, 0);
}
@ -132,7 +132,7 @@ void tl_direct(REQUEST_T req, struct session* ssn, mastodont_t* api)
try_post_status(ssn, api);
mstdnt_timeline_direct(api, &m_args, &args, &storage, &statuses, &statuses_len);
mstdnt_timeline_direct(api, &m_args, NULL, NULL, &args, &storage, &statuses, &statuses_len);
content_timeline(req, ssn, api, &storage, statuses, statuses_len, BASE_CAT_DIRECT, "Direct", 0, 0);
}
@ -162,7 +162,7 @@ void tl_public(REQUEST_T req, struct session* ssn, mastodont_t* api, int local,
try_post_status(ssn, api);
mstdnt_timeline_public(api, &m_args, &args, &storage, &statuses, &statuses_len);
mstdnt_timeline_public(api, &m_args, NULL, NULL, &args, &storage, &statuses, &statuses_len);
content_timeline(req, ssn, api, &storage, statuses, statuses_len, cat, NULL, 1, 0);
}
@ -189,7 +189,7 @@ void tl_list(REQUEST_T req, struct session* ssn, mastodont_t* api, char* list_id
try_post_status(ssn, api);
mstdnt_timeline_list(api, &m_args, list_id, &args, &storage, &statuses, &statuses_len);
mstdnt_timeline_list(api, &m_args, NULL, NULL, list_id, &args, &storage, &statuses, &statuses_len);
content_timeline(req, ssn, api, &storage, statuses, statuses_len, BASE_CAT_LISTS, "List timeline", 0, 0);
}
@ -216,7 +216,7 @@ void tl_tag(REQUEST_T req, struct session* ssn, mastodont_t* api, char* tag_id)
.limit = 20,
};
mstdnt_timeline_tag(api, &m_args, tag_id, &args, &storage, &statuses, &statuses_len);
mstdnt_timeline_tag(api, &m_args, NULL, NULL, tag_id, &args, &storage, &statuses, &statuses_len);
easprintf(&header, "Hashtag - #%s", tag_id);