 
         @syncdb.save()
 
-    declare_editing: (message) =>
+    toggle_editing: (message, is_editing) =>
         if not @syncdb?
             # TODO: give an error or try again later?
             return
         author_id = @redux.getStore('account').get_account_id()
+
+        if is_editing
+            editing = message.get('editing').add(author_id)
+        else
+            editing = message.get('editing').remove(author_id)
+
+        console.log("TOGGLE EDITORS:", editing.toJS())
         @syncdb.update
             set :
-                editing : message.get('editing')?.merge({author_id : true}).toJS() ? {author_id : true}
+                editing : editing.toJS()
             where :
                 date: message.get('date')
             is_equal: (a, b) => (a - 0) == (b - 0)

        author_id = @redux.getStore('account').get_account_id()
        # OPTIMIZATION: send less data over the network?
        time_stamp = salvus_client.server_time()
        #console.log("Current history", message.get('history').toJS())
        #console.log("New history", [{author_id: author_id, content:mesg, date:time_stamp}].concat(message.get('history').toJS()))
        #console.log("Get date:", message.get('date'), typeof message.get('date'))

        @syncdb.update
            set :
                history : [{author_id: author_id, content:mesg, date:time_stamp}].concat(message.get('history').toJS())
            where :
                date: message.get('date')
            is_equal: (a, b) => (a - 0) == (b - 0)

                    <ListGroupItem onDoubleClick={@edit_message} style={background:color, fontSize: font_size, borderRadius: borderRadius}>
                        {@render_markdown(value) if not @state.show_edit_input}
                        {@render_input() if @state.show_edit_input}
                        {@editing_status() if @props.message.get('history').size > 1}
                        {@get_timeago()}
                    </ListGroupItem>
                </ListGroup>
