diff options
| author | 2023-05-30 05:54:45 +0200 | |
|---|---|---|
| committer | 2023-05-30 05:54:45 +0200 | |
| commit | be39b52064771b94e8e28f45a6f43ce32dfcf87d (patch) | |
| tree | f20cec391417affee532505958ee164aba294332 /activitypub.c | |
| parent | Enqueue a close_question user q_item. (diff) | |
| download | snac2-be39b52064771b94e8e28f45a6f43ce32dfcf87d.tar.gz snac2-be39b52064771b94e8e28f45a6f43ce32dfcf87d.tar.xz snac2-be39b52064771b94e8e28f45a6f43ce32dfcf87d.zip | |
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) | |||
| 932 | } | 932 | } |
| 933 | 933 | ||
| 934 | 934 | ||
| 935 | xs_dict *msg_question(snac *user, const char *content, const xs_list *opts, int multiple, int end_secs) | 935 | xs_dict *msg_question(snac *user, const char *content, xs_list *attach, |
| 936 | const xs_list *opts, int multiple, int end_secs) | ||
| 936 | /* creates a Question message */ | 937 | /* creates a Question message */ |
| 937 | { | 938 | { |
| 938 | xs *ntid = tid(0); | 939 | xs *ntid = tid(0); |
| 939 | xs *id = xs_fmt("%s/q/%s", user->actor, ntid); | 940 | xs *id = xs_fmt("%s/q/%s", user->actor, ntid); |
| 940 | xs_dict *msg = msg_base(user, "Question", id, NULL, "@now", NULL); | 941 | xs_dict *msg = msg_note(user, content, NULL, NULL, attach, 0); |
| 941 | 942 | ||
| 942 | msg = xs_dict_append(msg, "content", content); | 943 | msg = xs_dict_set(msg, "type", "Question"); |
| 943 | msg = xs_dict_append(msg, "attributedTo", user->actor); | ||
| 944 | 944 | ||
| 945 | xs *o = xs_list_new(); | 945 | xs *o = xs_list_new(); |
| 946 | xs_list *p = (xs_list *)opts; | 946 | xs_list *p = (xs_list *)opts; |