From 47e6095eabb6341e746dba6a35a9c790a894181b Mon Sep 17 00:00:00 2001 From: vicnaum Date: Sun, 29 Dec 2024 18:06:26 +0100 Subject: [PATCH] misc: rename removePost to deletePost --- contracts/core/interfaces/IFeed.sol | 8 ++------ contracts/core/primitives/feed/Feed.sol | 6 ++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/contracts/core/interfaces/IFeed.sol b/contracts/core/interfaces/IFeed.sol index dd3a52b3..c8f44af3 100644 --- a/contracts/core/interfaces/IFeed.sol +++ b/contracts/core/interfaces/IFeed.sol @@ -61,7 +61,7 @@ interface IFeed is IMetadataBased { address indexed source ); - event Lens_Feed_PostRemoved( + event Lens_Feed_PostDeleted( uint256 indexed postId, address indexed author, KeyValue[] customParams, address indexed source ); @@ -136,12 +136,8 @@ interface IFeed is IMetadataBased { RuleProcessingParams[] calldata quotedPostRulesParams ) external; - // "Delete" - u know u cannot delete stuff from the internet, right? :] - // But this will at least remove it from the current state, so contracts accessing it will know. - // TODO: Debate post deletion, soft vs. hard delete, extra data deletion, etc. - function removePost( + function deletePost( uint256 postId, - bytes32[] calldata extraDataKeysToRemove, KeyValue[] calldata customParams, RuleProcessingParams[] calldata feedRulesParams ) external; diff --git a/contracts/core/primitives/feed/Feed.sol b/contracts/core/primitives/feed/Feed.sol index 4a63093f..2cc4a0c9 100644 --- a/contracts/core/primitives/feed/Feed.sol +++ b/contracts/core/primitives/feed/Feed.sol @@ -156,10 +156,8 @@ contract Feed is IFeed, RuleBasedFeed, AccessControlled, ExtraStorageBased, Sour } } - // TODO: Decide how DELETE operation should work in Feed (soft vs. hard delete) - function removePost( + function deletePost( uint256 postId, - bytes32[] calldata, /*extraDataKeysToRemove*/ // TODO: Consider moving this into customParams KeyValue[] calldata customParams, RuleProcessingParams[] calldata feedRulesParams ) external override { @@ -168,7 +166,7 @@ contract Feed is IFeed, RuleBasedFeed, AccessControlled, ExtraStorageBased, Sour Core._removePost(postId); _processPostRemoval(postId, customParams, feedRulesParams); address source = _processSourceStamp(postId, customParams); - emit Lens_Feed_PostRemoved(postId, author, customParams, source); + emit Lens_Feed_PostDeleted(postId, author, customParams, source); } function setExtraData(KeyValue[] calldata extraDataToSet) external override {