aleph-im / aleph-sdk-ts

A TypeScript SDK to interact with the Aleph I.M. network.
https://aleph-im.github.io/aleph-sdk-ts/
MIT License
11 stars 9 forks source link

Channel should not be mandatory when forgetting a message #136

Closed BjrInt closed 6 months ago

BjrInt commented 1 year ago

Problem description

Right now the forget.Publish() method expects a channel parameter alongside hashes. This is not needed since hashes are already unique by design.

This could also be problematic if the different messages hashes are not published on the same channel.

Possible enhancement

We could interpret this query SQL style, meaning that if a channel is specified but no hashes, this would remove all the messages from the account that match the channel. Specifying more parameters would restrict the number of messages to forget.

This could however be dangerous and a serious breaking change.