Skip to content

Conversation

@TomCasavant
Copy link
Contributor

@TomCasavant TomCasavant commented Apr 12, 2024

Addresses #189

I didn't add any styles to the new profile fields, so here's what they look like right now:
image

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)

image

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:

export async function getMessageCount() {
  return (await db?.get('select count(message) as count from messages where bookmark_id is not null'))?.count;
}

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

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);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant