Skip to content

Conversation

@BentiGorlich
Copy link
Member

  • Threads and microblogs can now be locked so comments cannot be added anymore. This includes:
    • API support (new scopes)
    • ActivityPub support (Lock activity, post editing, etc.)
  • Authors and moderators can lock threads and microblogs
  • Add modlog items for the new lock and unlock events
  • Add tests for basically everything

Related to #248

@BentiGorlich BentiGorlich self-assigned this Oct 31, 2025
@BentiGorlich BentiGorlich added enhancement New feature or request frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end activitypub ActivityPub related issues backend Backend related issues and pull requests api API related issues and pull requests labels Oct 31, 2025
@BentiGorlich BentiGorlich force-pushed the new/lock-entries-and-posts branch from ebba215 to 3234d80 Compare October 31, 2025 23:17
@melroy89 melroy89 self-requested a review November 3, 2025 14:02
@melroy89
Copy link
Member

melroy89 commented Nov 3, 2025

Is still a draft or not?

@BentiGorlich
Copy link
Member Author

Nope, ready to be reviewed :)

@BentiGorlich BentiGorlich force-pushed the new/lock-entries-and-posts branch from 71bc4bf to c81f5ca Compare November 11, 2025 16:55
$this->groupFactory->getActivityPubId($object->magazine),
$this->urlGenerator->generate('ap_user_followers', ['username' => $activity->userActor->username], UrlGeneratorInterface::ABSOLUTE_URL),
],
'object' => $objectUrl,
Copy link
Member

Choose a reason for hiding this comment

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

Maybe still good to check if $objectUrl is no null/empty?

$this->logger->info('[CreateHandler::doWork] Did not create the post, because the magazine {m} restricts posting to mods and {u} is not a mod', ['m' => $e->magazine, 'u' => $username]);
} catch (InstanceBannedException $e) {
$this->logger->info('[CreateHandler::doWork] Did not create the post, because the user\'s instance is banned');
} catch (UserBlockedException $e) {
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated to your change, but I think $e can be removed here as well. Since its not used.

@BentiGorlich BentiGorlich force-pushed the new/lock-entries-and-posts branch from c81f5ca to 50c314a Compare November 14, 2025 10:59
@melroy89
Copy link
Member

I notice you recently made (yesterday) some discoveries in this PR.. maybe its a good idea to wait with large PR after the 1.9.0 release..? Do you agree?

@BentiGorlich
Copy link
Member Author

I only resolved the merge conflict. But I don't need to have this in 1.9.0

@BentiGorlich BentiGorlich added this to the v1.9.1 milestone Nov 17, 2025
- Threads and microblogs can now be locked so comments cannot be added anymore. This includes:
  - API support (new scopes)
  - ActivityPub support (`Lock` activity, post editing, etc.)
- Authors and moderators can lock threads and microblogs
- Add modlog items for the new lock and unlock events
- Add tests for basically everything
- The `UpdateHandler` used the wrong boolean logic for setting the isLocked (which is the inverse of `commentsEnabled`)
- Add write to `isLocked` during the creation of entries and posts via ActivityPub
@BentiGorlich BentiGorlich force-pushed the new/lock-entries-and-posts branch from 8349166 to 01570d2 Compare November 19, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

activitypub ActivityPub related issues api API related issues and pull requests backend Backend related issues and pull requests enhancement New feature or request frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants