         latest_read_timestamp
     }
     sr = conv?.self_conversation_state?.self_read_state
-    if entity.isSelf(participant_id.chat_id) and sr
-        and latest_read_timestamp > sr.latest_read_timestamp
+    if entity.isSelf(participant_id.chat_id) and sr and latest_read_timestamp > sr.latest_read_timestamp
         sr.latest_read_timestamp = latest_read_timestamp
     updated 'conv'
 

        sender_id:
            chat_id:chat_id
            gaia_id:chat_id
        timestamp:(Date.now() * 1000)
    addChatMessage ev

addWatermark = (ev) ->


addChatMessagePlaceholder = (conv_id, chat_id, client_generated_id, segs) ->
    # e.self_event_state.client_generated_id
    ts = Date.now() * 1000
    ev =
        chat_message:message_content:segment:segs
        conversation_id:id:conv_id
