def do_change_stream_post_policy(stream: Stream, stream_post_policy: int) -> None:
    stream.stream_post_policy = stream_post_policy
    stream.save(update_fields=['stream_post_policy'])
    event = dict(op='update', type='stream', property='stream_post_policy', value=stream_post_policy, stream_id=stream.id, name=stream.name)
    send_event(stream.realm, event, can_access_stream_user_ids(stream))
    event = dict(op='update', type='stream', property='is_announcement_only', value=(stream.stream_post_policy == Stream.STREAM_POST_POLICY_ADMINS), stream_id=stream.id, name=stream.name)
    send_event(stream.realm, event, can_access_stream_user_ids(stream))
def do_change_stream_post_policy(stream: Stream, stream_post_policy: int) -> None:
    stream.stream_post_policy = stream_post_policy
    stream.save(update_fields=['stream_post_policy'])
    event = dict(op='update', type='stream', property='stream_post_policy', value=stream_post_policy, stream_id=stream.id, name=stream.name)
    send_event(stream.realm, event, can_access_stream_user_ids(stream))
    event = dict(op='update', type='stream', property='is_announcement_only', value=(stream.stream_post_policy == Stream.STREAM_POST_POLICY_ADMINS), stream_id=stream.id, name=stream.name)
    send_event(stream.realm, event, can_access_stream_user_ids(stream))