Close the stream

+1 vote
Let say i created a stream and other user have subscribed to it. They are able to publish items to the stream.

How can i make like for a certain period i will close the stream, which mean other user including me cannot publish anything anymore. However, we can only view the items in it.

Because i intend to create like a voting system where users giving certain time to vote, after that the stream will be closed.
asked Feb 22, 2017 by anonymous

1 Answer

0 votes

If the stream is created as open, meaning that anyone can write to it, then there is not currently a way to close the stream. However if the stream is not open, it can be closed simply by removing the per-stream write permissions from all the addresses that have it.

answered Feb 22, 2017 by MultiChain
Is it possible to remove all write permission in the stream?? Or i need to remove one by one per address?
For now, it's one by one, but:

a) You can use listpermissions to see all these addresses in one go.
b) You can revoke permissions for multiple addresses in a single API call, by passing a comma-separated list of addresses.
Do you mind giving me an example of passing a comma-separated list of addresses? thank you very much.
revoke 1HH6ntWTKUdJynL5GhMrfLkSbLVdziuGFx,1ETNztQk6tPxbFo34KtZgTPpCFciDJHgQn,1DQzWrZ54CkH93R7KsSL7e72yMCa79pR8v stream1.write
which mean if i have multiple stream in the blockchain, i can choose to revoke for example stream1.write but the user still can write on stream2 or 3 etc right?

And maybe i know what are the arguements for revoke function?

Thank you.
...