@@ -2297,7 +2297,7 @@ func (fes *APIServer) GetNotifications(ww http.ResponseWriter, req *http.Request
22972297 // heavy lifting.
22982298 postEntryResponses := make (map [string ]* PostEntryResponse )
22992299
2300- addPostForHash := func (postHashHex string , readerPK []byte , profileEntryRequired bool ) {
2300+ addPostForHash := func (postHashHex string , readerPK []byte ) {
23012301 // If we already have the post entry response in the map, just return
23022302 if _ , exists := postEntryResponses [postHashHex ]; exists || postHashHex == "" {
23032303 return
@@ -2318,12 +2318,6 @@ func (fes *APIServer) GetNotifications(ww http.ResponseWriter, req *http.Request
23182318
23192319 profileEntryResponse := profileEntryResponses [lib .PkToString (postEntry .PosterPublicKey , fes .Params )]
23202320
2321- // Filter out responses if profile entry is missing and is required
2322- if profileEntryRequired && profileEntryResponse == nil {
2323- postEntryResponses [postHashHex ] = nil
2324- return
2325- }
2326-
23272321 postEntryResponse , err := fes ._postEntryToResponse (postEntry , false , fes .Params , utxoView , userPublicKeyBytes , 2 )
23282322 if err != nil {
23292323 return
@@ -2349,26 +2343,26 @@ func (fes *APIServer) GetNotifications(ww http.ResponseWriter, req *http.Request
23492343 postAssociationMetadata := txnMeta .Metadata .CreatePostAssociationTxindexMetadata
23502344
23512345 if postMetadata != nil {
2352- addPostForHash (postMetadata .PostHashBeingModifiedHex , userPublicKeyBytes , true )
2353- addPostForHash (postMetadata .ParentPostHashHex , userPublicKeyBytes , true )
2346+ addPostForHash (postMetadata .PostHashBeingModifiedHex , userPublicKeyBytes )
2347+ addPostForHash (postMetadata .ParentPostHashHex , userPublicKeyBytes )
23542348 } else if likeMetadata != nil {
2355- addPostForHash (likeMetadata .PostHashHex , userPublicKeyBytes , true )
2349+ addPostForHash (likeMetadata .PostHashHex , userPublicKeyBytes )
23562350 } else if transferCreatorCoinMetadata != nil {
23572351 if transferCreatorCoinMetadata .PostHashHex != "" {
2358- addPostForHash (transferCreatorCoinMetadata .PostHashHex , userPublicKeyBytes , true )
2352+ addPostForHash (transferCreatorCoinMetadata .PostHashHex , userPublicKeyBytes )
23592353 }
23602354 } else if nftBidMetadata != nil {
2361- addPostForHash (nftBidMetadata .NFTPostHashHex , userPublicKeyBytes , true )
2355+ addPostForHash (nftBidMetadata .NFTPostHashHex , userPublicKeyBytes )
23622356 } else if acceptNFTBidMetadata != nil {
2363- addPostForHash (acceptNFTBidMetadata .NFTPostHashHex , userPublicKeyBytes , true )
2357+ addPostForHash (acceptNFTBidMetadata .NFTPostHashHex , userPublicKeyBytes )
23642358 } else if nftTransferMetadata != nil {
2365- addPostForHash (nftTransferMetadata .NFTPostHashHex , userPublicKeyBytes , false )
2359+ addPostForHash (nftTransferMetadata .NFTPostHashHex , userPublicKeyBytes )
23662360 } else if createNFTMetadata != nil {
2367- addPostForHash (createNFTMetadata .NFTPostHashHex , userPublicKeyBytes , true )
2361+ addPostForHash (createNFTMetadata .NFTPostHashHex , userPublicKeyBytes )
23682362 } else if updateNFTMetadata != nil {
2369- addPostForHash (updateNFTMetadata .NFTPostHashHex , userPublicKeyBytes , true )
2363+ addPostForHash (updateNFTMetadata .NFTPostHashHex , userPublicKeyBytes )
23702364 } else if postAssociationMetadata != nil {
2371- addPostForHash (postAssociationMetadata .PostHashHex , userPublicKeyBytes , false )
2365+ addPostForHash (postAssociationMetadata .PostHashHex , userPublicKeyBytes )
23722366 } else if basicTransferMetadata != nil {
23732367 txnOutputs := txnMeta .Metadata .TxnOutputs
23742368 for _ , output := range txnOutputs {
@@ -2380,7 +2374,7 @@ func (fes *APIServer) GetNotifications(ww http.ResponseWriter, req *http.Request
23802374 })
23812375 }
23822376 if basicTransferMetadata .PostHashHex != "" {
2383- addPostForHash (basicTransferMetadata .PostHashHex , userPublicKeyBytes , true )
2377+ addPostForHash (basicTransferMetadata .PostHashHex , userPublicKeyBytes )
23842378 }
23852379 }
23862380
0 commit comments