more social card tweaks, and include in RSS as well (#2599)
* move link expander to new file, add test, refactor a bit * text formatting: include indication if a quote post exists * rss: include expanded links
This commit is contained in:
parent
c58e65000d
commit
a2f49bb08c
5 changed files with 167 additions and 46 deletions
|
@ -96,7 +96,10 @@ func (srv *Server) WebProfileRSS(c echo.Context) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rec := p.Post.Record.Val.(*appbsky.FeedPost)
|
||||
rec, ok := p.Post.Record.Val.(*appbsky.FeedPost)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
// only top-level posts in RSS (no replies)
|
||||
if rec.Reply != nil {
|
||||
continue
|
||||
|
@ -108,7 +111,7 @@ func (srv *Server) WebProfileRSS(c echo.Context) error {
|
|||
}
|
||||
posts = append(posts, Item{
|
||||
Link: fmt.Sprintf("https://%s/profile/%s/post/%s", req.Host, pv.Handle, aturi.RecordKey().String()),
|
||||
Description: rec.Text,
|
||||
Description: ExpandPostText(rec),
|
||||
PubDate: pubDate,
|
||||
GUID: ItemGUID{
|
||||
Value: aturi.String(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue