Skip to content

Commit 318165d

Browse files
include reply + response
1 parent 8562ed8 commit 318165d

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* `bs_send_message_batch()` sends a batch of messages to different conversations
2828
* Fixes an issue where actual numbers with a # sign would cause failures in posting (#45).
2929
* Avoids creating raw version of files for upload where possible (#16).
30+
* Always returns `embed` for `bs_get_posts()` (#40, #41).
31+
* Include all returned information in `bs_get_author_feed()`. Note that this requires adding a prefix to `reply` and `reason` information. (#43)
3032

3133
# bskyr 0.3.0
3234

R/feed_author_feed.R

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,22 @@ bs_get_author_feed <- function(actor, cursor = NULL, limit = NULL,
5757

5858
lapply(resp, function(f) {
5959
lapply(f$feed, function(x) {
60-
if (is.null(x$reply)) {
61-
proc_post(x$post)
62-
} else {
63-
dplyr::bind_cols(
64-
proc_post(x$post),
65-
widen(x$reply)
60+
post <- proc_post(x$post)
61+
if (!is.null(x$reply)) {
62+
post <- dplyr::bind_cols(
63+
post,
64+
widen(x$reply) |>
65+
dplyr::rename_with(function(x) paste0('reply_', x))
6666
)
6767
}
68+
if (!is.null(x$reason)) {
69+
post <- dplyr::bind_cols(
70+
post,
71+
widen(x$reason) |>
72+
dplyr::rename_with(function(x) paste0('reason_', x))
73+
)
74+
}
75+
post
6876
}) |>
6977
purrr::list_rbind() |>
7078
clean_names()

0 commit comments

Comments
 (0)