Add profile attachments (and a way of updating followers with new profile info)#190
Open
TomCasavant wants to merge 4 commits intockolderup:mainfrom
Open
Add profile attachments (and a way of updating followers with new profile info)#190TomCasavant wants to merge 4 commits intockolderup:mainfrom
TomCasavant wants to merge 4 commits intockolderup:mainfrom
Conversation
TomCasavant
commented
May 7, 2025
Comment on lines
+291
to
+296
| for (const follower of followers) { | ||
| const myURL = new URL(follower); | ||
| const targetDomain = myURL.host; | ||
| const inbox = `https://${targetDomain}/inbox`; | ||
| signAndSend(updateMessage, account, domain, db, targetDomain, inbox); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Before this gets merged in, this should be swapped out to properly grab the user's (or instance's) inbox (in case, as in Postmark's case, the user's inbox is not located at {user}/inbox)
Related: #208
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #189
I didn't add any styles to the new profile fields, so here's what they look like right now:

And then as of right now the only way I have to update current followers with this any new profile updates is to uncomment this line in server.js (EDIT: Moved updateProfile call to fix linting issues)
//updateProfile(account, domain)I have it commented it out by default because I assume we don't want to send a message to every follower whenever the server boots up (and eventually I assume we'll have a way to update your profile from the admin page? In which case we'd just trigger updateProfile whenever that gets changed)
Maybe this belongs in a different issue/feature request but I was thinking since we already have a variable for the mastodon account we could probably include that as a profile field by default if it exists
Lastly, I just noticed this as I was making this PR, in this current setup it adds up profile updates in the total post count, that gets fixed if I modify this function to:
But I'd like clarification on if I'm storing these activities/updates in the right spot in the database or if there are any other non-bookmark activities that we are already storing