Remind before LinkedIn's sign-in expires, and stop posting once it has
LinkedIn tokens last 60 days and can't be renewed without signing in again. The expiry LinkedIn reports is now recorded (60 days from sign-in for older connections). The LinkedIn card says until when; from two weeks before, the Overview, the Inbox and the card remind you, with a Reconnect button. Once expired, LinkedIn counts as not connected, due posts come back to the Inbox saying why, and a 401 from LinkedIn reads "reconnect LinkedIn" instead of the raw error. Also fixes a leftover "Settings → Credentials" in a publish error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -72,8 +72,10 @@ func groupBatches(drafts []content.Draft) []*draftBatch {
|
||||
|
||||
func (s *Server) connected() map[string]bool {
|
||||
out := map[string]bool{}
|
||||
for id := range s.publishers() {
|
||||
out[id] = true
|
||||
for id, p := range s.publishers() {
|
||||
if _, expired := p.(expiredPublisher); !expired {
|
||||
out[id] = true
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
@@ -93,6 +95,7 @@ func (s *Server) renderInbox(w http.ResponseWriter, r *http.Request, errMsg stri
|
||||
sections = append(sections, inboxSection{Module: "Content", Batches: groupBatches(pending)})
|
||||
}
|
||||
s.render(w, r, "inbox", page{Title: "Inbox", Nav: "content/inbox", Error: errMsg, Data: map[string]any{
|
||||
"Reminders": s.reminders(),
|
||||
"Sections": sections,
|
||||
"Reddit": s.redditViews(r.Context(), pending),
|
||||
"Connected": s.connected(),
|
||||
|
||||
Reference in New Issue
Block a user