mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 05:15:04 +00:00
Replaced all calls to post() with enqueue_message().
This commit is contained in:
parent
427f7341fa
commit
25acaf178c
4 changed files with 9 additions and 9 deletions
|
@ -827,7 +827,7 @@ int process_message(snac *snac, char *msg, char *req)
|
|||
xs *f_msg = xs_dup(msg);
|
||||
xs *reply = msg_accept(snac, f_msg, actor);
|
||||
|
||||
post(snac, reply);
|
||||
enqueue_message(snac, reply);
|
||||
|
||||
if (xs_is_null(xs_dict_get(f_msg, "published"))) {
|
||||
/* add a date if it doesn't include one (Mastodon) */
|
||||
|
|
2
data.c
2
data.c
|
@ -1397,7 +1397,7 @@ void enqueue_message(snac *snac, char *msg)
|
|||
|
||||
_enqueue_put(fn, qmsg);
|
||||
|
||||
snac_debug(snac, 1, xs_fmt("enqueue_message %s", id));
|
||||
snac_debug(snac, 0, xs_fmt("enqueue_message %s", id));
|
||||
}
|
||||
|
||||
|
||||
|
|
10
html.c
10
html.c
|
@ -1320,7 +1320,7 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
|
|||
|
||||
c_msg = msg_create(&snac, msg);
|
||||
|
||||
post(&snac, c_msg);
|
||||
enqueue_message(&snac, c_msg);
|
||||
|
||||
timeline_add(&snac, xs_dict_get(msg, "id"), msg, in_reply_to, NULL);
|
||||
}
|
||||
|
@ -1345,7 +1345,7 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
|
|||
xs *msg = msg_admiration(&snac, id, "Like");
|
||||
|
||||
if (msg != NULL) {
|
||||
post(&snac, msg);
|
||||
enqueue_message(&snac, msg);
|
||||
timeline_admire(&snac, msg, id, snac.actor, 1);
|
||||
}
|
||||
}
|
||||
|
@ -1354,7 +1354,7 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
|
|||
xs *msg = msg_admiration(&snac, id, "Announce");
|
||||
|
||||
if (msg != NULL) {
|
||||
post(&snac, msg);
|
||||
enqueue_message(&snac, msg);
|
||||
timeline_admire(&snac, msg, id, snac.actor, 0);
|
||||
}
|
||||
}
|
||||
|
@ -1407,7 +1407,7 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
|
|||
/* it's a post by us: generate a delete */
|
||||
xs *msg = msg_delete(&snac, id);
|
||||
|
||||
post(&snac, msg);
|
||||
enqueue_message(&snac, msg);
|
||||
|
||||
/* FIXME: also post this Tombstone to people
|
||||
that Announce'd it */
|
||||
|
@ -1474,7 +1474,7 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
|
|||
xs *a_msg = msg_actor(&snac);
|
||||
xs *u_msg = msg_update(&snac, a_msg);
|
||||
|
||||
post(&snac, u_msg);
|
||||
enqueue_message(&snac, u_msg);
|
||||
|
||||
status = 303;
|
||||
}
|
||||
|
|
4
main.c
4
main.c
|
@ -175,7 +175,7 @@ int main(int argc, char *argv[])
|
|||
xs *msg = msg_admiration(&snac, url, "Announce");
|
||||
|
||||
if (msg != NULL) {
|
||||
post(&snac, msg);
|
||||
enqueue_message(&snac, msg);
|
||||
|
||||
if (dbglevel) {
|
||||
xs *j = xs_json_dumps_pp(msg, 4);
|
||||
|
@ -290,7 +290,7 @@ int main(int argc, char *argv[])
|
|||
printf("%s\n", j);
|
||||
}
|
||||
|
||||
post(&snac, c_msg);
|
||||
enqueue_message(&snac, c_msg);
|
||||
|
||||
timeline_add(&snac, xs_dict_get(msg, "id"), msg, in_reply_to, NULL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue