mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
New verify_links q_item.
This commit is contained in:
parent
ada3e978c5
commit
34349112f6
3 changed files with 18 additions and 0 deletions
|
@ -2191,6 +2191,10 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
|
|||
if (!xs_is_null(id))
|
||||
timeline_request_replies(snac, id);
|
||||
}
|
||||
else
|
||||
if (strcmp(type, "verify_links") == 0) {
|
||||
verify_links(snac);
|
||||
}
|
||||
else
|
||||
snac_log(snac, xs_fmt("unexpected user q_item type '%s'", type));
|
||||
}
|
||||
|
|
13
data.c
13
data.c
|
@ -2365,6 +2365,19 @@ void enqueue_close_question(snac *user, const char *id, int end_secs)
|
|||
}
|
||||
|
||||
|
||||
void enqueue_verify_links(snac *user)
|
||||
/* enqueues a link verification */
|
||||
{
|
||||
xs *qmsg = _new_qmsg("verify_links", "", 0);
|
||||
char *ntid = xs_dict_get(qmsg, "ntid");
|
||||
xs *fn = xs_fmt("%s/queue/%s.json", user->basedir, ntid);
|
||||
|
||||
qmsg = _enqueue_put(fn, qmsg);
|
||||
|
||||
snac_debug(user, 0, xs_fmt("enqueue_verify_links %s", user->actor));
|
||||
}
|
||||
|
||||
|
||||
void enqueue_request_replies(snac *user, const char *id)
|
||||
/* enqueues a request for the replies of a message */
|
||||
{
|
||||
|
|
1
snac.h
1
snac.h
|
@ -211,6 +211,7 @@ void enqueue_telegram(const xs_str *msg, const char *bot, const char *chat_id);
|
|||
void enqueue_ntfy(const xs_str *msg, const char *ntfy_server, const char *ntfy_token);
|
||||
void enqueue_message(snac *snac, const xs_dict *msg);
|
||||
void enqueue_close_question(snac *user, const char *id, int end_secs);
|
||||
void enqueue_verify_links(snac *user);
|
||||
void enqueue_request_replies(snac *user, const char *id);
|
||||
int was_question_voted(snac *user, const char *id);
|
||||
|
||||
|
|
Loading…
Reference in a new issue