Commit Graph

70 Commits

Author SHA1 Message Date
Matt Baer 45ca9c4c2b
Merge pull request #781 from writefreely/fix-updates-masto
Ensure Update activities work with Mastodon
2023-10-23 12:49:30 -04:00
Matt Baer dd797c8145 Add missing methods for showing fediverse followers
Fixes #791
2023-10-13 16:45:12 -04:00
Matt Baer 273267343a Ensure Updated property can be omitted
Now, the web-core pkg uses a pointer instead of a var, so we don't send
a zero time.Time value out via ActivityPub.
2023-10-02 21:35:23 -04:00
Matt Baer 167971771e Send `updated` parameter with `Update` activities
Per the Mastodon docs, this ensures the activity correctly updates posts there.
https://docs.joinmastodon.org/spec/activitypub/#supported-activities-for-statuses
2023-10-02 19:33:03 -04:00
Matt Baer 96eb800eaa
Merge pull request #730 from testwill/loop
chore: slice replace loop
2023-09-22 13:01:36 -04:00
Matt Baer 177cbf2e57
Merge pull request #728 from testwill/ioutil
chore: remove refs to deprecated io/ioutil
2023-09-22 13:00:41 -04:00
Matt Baer 264bef03b1 Support rel=me verification on blogs
This allows setting a URL, and then renders a <link> element
in the head of the blog. It requires a database migration.

Ref T744
2023-09-21 19:04:34 -04:00
guoguangwu 78e59b749b chore: slice replace loop 2023-07-11 12:17:34 +08:00
guoguangwu cf53730f6c chore: remove refs to deprecated io/ioutil 2023-07-10 17:55:04 +08:00
Matt Baer d08f067e9c Change copyright notices to Musing Studio LLC
A Bunch Tell is now Musing Studio.
2022-11-10 23:49:16 -05:00
Matt Baer 61974fadc0 Merge branch 'develop' into remove-nerds-dep 2021-04-19 16:18:33 -04:00
Matt Baer 4228761eb3
Merge pull request #431 from Dak425/stop-federating-protected-and-private-blogs
Stop private and protected blogs from federating
2021-04-07 10:54:28 -04:00
Donald Feury 68297acb74 Moved guard clauses to stop federation before debug logging 2021-04-07 11:27:25 -04:00
Matt Baer 64f1d71524 Remove writeas/nerds/store dependency 2021-03-30 12:49:12 -04:00
Matt Baer 9b336dee8c Fix instance-wide actor lookup
This skips the silenced-user check.

Ref T820
2021-03-08 12:54:50 -05:00
Matt Baer 9aeeb52bdb Fix nil pointer on instance-wide actor lookup
Ref T820
2021-03-08 12:50:08 -05:00
Matt Baer 9484880bca Sign actor fetch request
This fixes federation with Mastodon instances that have Authorized
Fetch turned on by signing the GET request to fetch the actor when
a blog is first followed.

Ref T820
2021-03-08 11:43:38 -05:00
Donald Feury e6417d911c Stop private and protected blogs from federating
Fixes #403
2021-01-27 19:39:46 -05:00
Matt Baer 95273697f4 Use consistent server User-Agent across application 2020-08-18 12:22:04 -04:00
Matt Baer 507acc7e1c Support AP-style mentions of centralized social media accounts
This allows users to mention users on the following non-ActivityPub
social media sites:

- twitter.com
- medium.com

It also adds missing error handling in federatePost().
2020-06-08 13:50:43 -04:00
Matt Baer 9d854c17c1 Only log "No to!" when debugging
Fixes #311
2020-05-15 13:48:20 -04:00
Matt Baer 5e4ed5d9bc Remove extraneous @context fields on AP outbox 2020-04-15 12:30:50 -04:00
Matt Baer 9dbba9d8c7 Make `handle` column in remoteusers NULL
This alters the V6 migration to make the column NULLable. Anyone who has already run this migration will need to manually update their database.
2020-03-24 07:59:00 -04:00
Matt Baer 8e8eb3c563
Merge pull request #260 from writeas/fix-deletion-pleroma
Fix post deletion on Pleroma
2020-02-19 09:59:25 -05:00
Matt Baer ab2b8dff7f
Merge pull request #249 from writeas/fix-activitypub-client
Improve resource use for federation
2020-02-09 12:03:00 -05:00
Matt Baer 468bbf2187 Merge branch 'develop' into rename-account-suspend 2020-02-09 11:14:14 -05:00
Matt Baer fe82cbb96e Fix post deletion on Pleroma
See: https://git.pleroma.social/pleroma/pleroma/issues/1481

Fixes #223
2020-02-08 15:19:06 -05:00
Matt Baer 9589612d0e Add TODOs for improving GetProfilePageFromHandle() 2020-02-08 13:05:54 -05:00
Matt Baer 68d63d3fef Merge branch 'develop' into activitypub-mentions 2020-02-08 11:51:18 -05:00
Matt Baer ff33c59f27
Merge pull request #180 from writeas/cache-control
Add Cache-Control headers on AP endpoints

Closes T693
2020-01-31 12:00:47 +01:00
Matt Baer bf8dcff01e Quit AP goroutine early when there's no "to"
Previously, we'd sleep for 2 seconds and then return for no reason. This
fixes that.
2020-01-27 09:23:50 -05:00
Matt Baer 8d3e755c8f Return pointer to http.Client in activityPubClient() 2020-01-23 12:03:23 -05:00
Matt Baer bc9843dfa3 Add timeout on ActivityPub requests 2020-01-23 11:47:35 -05:00
Matt Baer d8df15855c Merge branch 'develop' into activitypub-mentions 2019-11-26 13:19:20 -05:00
Rob Loranger 7e014ca659
Rename Suspend status to Silence
This changes all variables and functions from using Suspend{ed} to using
Silence{d} as well as documentation, errors and logging.
2019-11-11 15:25:19 -08:00
Matt Baer 53586d9cb8 Merge branch 'develop' into T661-disable-accounts 2019-11-12 01:46:37 +09:00
Matt Baer fcf074cf40
Merge pull request #166 from writeas/159-follow-panic
fix panic on duplicate remoteuser key
2019-11-07 12:26:57 +09:00
Rob Loranger f85f0751a3
address PR comments
- update error messages to be correct
- move suspended message into template and include for other pages
- check suspended status on all relevant pages and show message if
logged in user is suspended.
- fix possible nil pointer error
- remove changes to db schema files
- add version comment to migration
- add UserStatus type with UserActive and UserSuspended
- change database table to use status column instead of suspended
- update toggle suspended handler to be toggle status in prep for
possible future inclusion of further user statuses
2019-10-25 12:04:24 -07:00
Matt Baer 9873fc443f Merge branch 'develop' into T661-disable-accounts 2019-10-24 13:22:26 -04:00
Michael Demetriou b9d2689828 Fix comments on T627 pull request
(https://github.com/writeas/writefreely/pull/195)
2019-10-11 10:05:18 +03:00
Michael Demetriou 99bb77153e Handles are saved in `remoteusers` while the links take you to an
intermediate page (WIP) that shows the user profile page url
2019-10-10 15:11:46 +03:00
Michael Demetriou 3eb638b14a Fix @thebaer's comments in dccfae7a61 (commitcomment-35410380) 2019-10-09 14:34:31 +03:00
Michael Demetriou dccfae7a61 Mentioning pleroma accounts works! Mastodon still needs the type to b
be Note to work but I will open an issue for them and see what their
reaction will be.
2019-10-08 15:58:19 +03:00
Matt Baer b7acd39051 Add Cache-Control headers on AP endpoints
Includes:

* AP Collection fetching via canonical URL
* AP Collection fetching via API
* AP Post fetching via canonical URL
* AP Post fetching via API

Ref T693
2019-09-09 22:07:03 +02:00
Rob Loranger 77f7b4a522
Add account suspension features
This renders all requests for that user's posts, collections and related
ActivityPub endpoints with 404 responses.

While suspended, users may not create or edit posts or collections.

User status is listed in the admin user page

Admin view of user details shows status and now has a button to activate
or suspend a user.
2019-08-29 09:09:11 -07:00
Rob Loranger 95a98234eb
fix panic on duplicate remoteuser key
this changes handleFetchCollectionInbox to log _all_ errors after
attempting to insert an actor in the remoteusers table. previously
checking for all errors _except_ duplicate keys would cause a panic if
an actor made a request to follow while already having followed.
2019-08-09 14:04:15 -07:00
Matt Baer ff7828c558 Link hashtags to Reader when Chorus mode enabled
instead of linking to posts only on a user's blog.

Ref T681
2019-08-07 09:40:07 -04:00
Matt Baer 86a128483b Fix more missing hostNames
This fixes places, especially around federation, where the Collection's
`hostName` wasn't set.
2019-06-20 21:08:30 -04:00
Matt Baer f38a135bfa Remove global hostName var
This moves `hostName` to the `Collection` struct, where it's needed. The
field is populated after successful `GetCollection...()` calls.

This isn't the cleanest way to do things, but it accomplishes the goal.
Eventually, we should accept the AppCfg to `GetCollection...()` calls,
or make them `App` methods, instead of `datastore` methods.

Ref T613
2019-06-14 18:54:04 -04:00
Matt Baer d5c2fe47da
Merge branch 'develop' into librarization 2019-06-13 20:44:55 -04:00