diff options
author | default <nobody@localhost> | 2023-05-30 05:54:45 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-05-30 05:54:45 +0200 |
commit | be39b52064771b94e8e28f45a6f43ce32dfcf87d (patch) | |
tree | f20cec391417affee532505958ee164aba294332 /activitypub.c | |
parent | 765936244888f8d5f1644b0178cc6dc70597166b (diff) |
Create the base message of msg_question() from msg_note().
Diffstat (limited to 'activitypub.c')
-rw-r--r-- | activitypub.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activitypub.c b/activitypub.c index 15937c3..e9db6ba 100644 --- a/activitypub.c +++ b/activitypub.c @@ -932,15 +932,15 @@ xs_dict *msg_pong(snac *user, const char *rcpt, const char *object) } -xs_dict *msg_question(snac *user, const char *content, const xs_list *opts, int multiple, int end_secs) +xs_dict *msg_question(snac *user, const char *content, xs_list *attach, + const xs_list *opts, int multiple, int end_secs) /* creates a Question message */ { xs *ntid = tid(0); xs *id = xs_fmt("%s/q/%s", user->actor, ntid); - xs_dict *msg = msg_base(user, "Question", id, NULL, "@now", NULL); + xs_dict *msg = msg_note(user, content, NULL, NULL, attach, 0); - msg = xs_dict_append(msg, "content", content); - msg = xs_dict_append(msg, "attributedTo", user->actor); + msg = xs_dict_set(msg, "type", "Question"); xs *o = xs_list_new(); xs_list *p = (xs_list *)opts; |