Skip to content

Conversation

@Acture
Copy link
Contributor

@Acture Acture commented Dec 3, 2025

This feature involves modifications across three main components: the Notification/Message service, the Hole service, and the Floor service. Closes #171.

  • Introduced new methods to the message deletion logic:

    • DeleteMessageByRelatedFloorID(ID)
    • DeleteMessageByRelatedHoleID(ID)
  • The Notification model is extended to explicitly store the source content IDs (e.g., related_hole_id, related_floor_id).

  • Integration points were added to the business logic of Hole and Floor deletion/restriction operations.

    • Triggers: The notification deletion request is now sent when content meets any of the following criteria:

      • Floor/Hole is permanently deleted (DELETE).
      • Hole is hidden (e.g., administrator action).
      • Floor/Hole is marked as sensitive/restricted.

Not sure if this is what was requested. Not tested due to the lack of data.

- Introduced `DeleteMessageByRelatedFloorID` and `DeleteMessageByRelatedHoleID` methods to handle message deletions based on related floor or hole IDs.
- Introduced `RelatedFloorID` and `RelatedHoleID` fields to the `Notification` model to improve context in messages.
- Updated apis in `report` and `penalty` to populate these fields when creating notifications.
- Enhanced sensitive content and modification notifications with related IDs for better traceability.
- Improved message construction consistency across `floor` operations.
- Added calls to `DeleteMessageByRelatedHoleID` and `DeleteMessageByRelatedFloorID` in hole and floor deletion logic.
- Ensured proper error handling during message deletion for associated content.
- Tidied up code formatting in affected areas for better readability.
@Acture Acture requested review from JingYiJun and ppolariss and removed request for ppolariss December 3, 2025 11:47
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.

[Feature Request] 内容被删除后,向notification发请求,删除对应的通知内容

2 participants