Add a new chat state
        ---
        serializer: MessengerChatStateSerializer
        responseMessages:
            - code: 401
              message: Not authenticated
            - code: 400
              message: Not valid request
358972
def post(self, request, bot_id, format=None):
        
        return super(MessengerChatStateList, self).post(request, bot_id, format)
738356
def chat_update(self, room_id, msg_id, text, **kwargs):
        """"""
        return self.__call_api_post('chat.update', roomId=room_id, msgId=msg_id, text=text, kwargs=kwargs)
1038566
def get(self, request, bot_id, format=None):
        
        return super(KikChatStateList, self).get(request, bot_id, format)
579977
def send_text(self, chat_id, content, safe=0):
        
        return self.send(chat_id, 'text', safe=safe, content=content)
1139617
def put(self, request, bot_id, id, format=None):
              
        return super(MessengerBotDetail, self).put(request, bot_id, id, format)
910564
public Observable<ComapiResult<Void>> updateMessageStatus(@NonNull final String conversationId, @NonNull final List<MessageStatusUpdate> msgStatusList) {

        final String token = getToken();

        if (sessionController.isCreatingSession()) {
            return getTaskQueue().queueUpdateMessageStatus(conversationId, msgStatusList);
        } else if (TextUtils.isEmpty(token)) {
            return Observable.error(getSessionStateErrorDescription());
        } else {
            return doUpdateMessageStatus(token, conversationId, msgStatusList);
        }
    }
821464
public void pushChatGrabber (JTextComponent comp)
    {
        // note this component as the new chat grabber
        _curChatGrabber = comp;

        // add the component to the list of grabbers
        _chatGrabbers.addLast(comp);
        comp.addAncestorListener(this);

        // and request to give the new component the focus since that's a
        // sensible thing to do as it's aiming to nab all key events
        // henceforth
        comp.requestFocusInWindow();
    }
344916
def add_message(request, level, message, extra_tags='', fail_silently=False):
    """"""
    if not horizon_message_already_queued(request, message):
        if request.is_ajax():
            tag = constants.DEFAULT_TAGS[level]
            # if message is marked as safe, pass "safe" tag as extra_tags so
            # that client can skip HTML escape for the message when rendering
            if isinstance(message, SafeData):
                extra_tags = extra_tags + ' safe'
            request.horizon['async_messages'].append([tag,
                                                      force_text(message),
                                                      extra_tags])
        else:
            return _messages.add_message(request, level, message,
                                         extra_tags, fail_silently)
347666
def _create_request(self, messages):
        

        msg = ','.join(messages)
        request = '{{"request":"sender data","data":[{msg}]}}'.format(msg=msg)
        request = request.encode("utf-8")
        logger.debug('Request: %s', request)

        return request
359253
def put(self, request, bot_id, hook_id, id, format=None):
        
        bot = self.get_bot(bot_id, request.user)
        hook = self.get_hook(hook_id, bot, request.user)
        recipient = self.get_recipient(id, hook, request.user)
        serializer = self.serializer(recipient, data=request.data)
        
        if serializer.is_valid():
            serializer.save()
            return Response(serializer.data)

        return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
108961
function send(userToken, conversationId, message, data) {
  const form = new FormData()
  form.append('message', message)
  if (data != null) {
    form.append('data', data)
  }

  const headers = form.getHeaders()
  headers.sessionToken = userToken

  const options = {
    hostname: SymConfigLoader.SymConfig.agentHost,
    port: SymConfigLoader.SymConfig.agentPort,
    path: `/agent/v4/stream/${conversationId}/message/create`,
    method: 'POST',
    headers: headers,
    agent: SymConfigLoader.SymConfig.podProxy,
  }

  return request(options, 'OBOClient/oboSendMessage', form)
}
1118137
def getChat(self, chat_id):
        
        p = _strip(locals())
        return self._api_request('getChat', _rectify(p))
1188347
def send_msg(self, chat_id, msg_type, **kwargs):
        
        return self.send(chat_id, msg_type, **kwargs)
399473
def post(self, request, bot_id, format=None):
        
        return super(KikChatStateList, self).post(request, bot_id, format)
1349184
async def _send(self,
                    request: Request,
                    content: Dict[Text, Any],
                    stack: Stack):
        

        msg = {
            'recipient': {
                'id': request.conversation.fbid,
            },
            'message': content,
        }

        if stack and stack.has_layer(MessagingType):
            mt = stack.get_layer(MessagingType)
        else:
            mt = MessagingType(response=True)

        msg.update(mt.serialize())
        msg_json = ujson.dumps(msg)

        headers = {
            'content-type': 'application/json',
        }

        params = {
            'access_token': self._access_token(request),
        }

        post = self.session.post(
            MESSAGES_ENDPOINT,
            params=params,
            data=msg_json,
            headers=headers,
        )

        logger.debug('Sending: %s', msg_json)

        async with post as r:
            await self._handle_fb_response(r)
908468
@SuppressLint("UseSparseArrays")
    public void addStatusUpdate(ChatMessageStatus status) {
        int unique = (status.getMessageId() + status.getProfileId() + status.getMessageStatus().name()).hashCode();
        if (statusUpdates == null) {
            statusUpdates = new HashMap<>();
        }
        statusUpdates.put(unique, status);
    }
764905
Observable<ChatResult> synchroniseConversation(String conversationId) {

        return checkState().flatMap(client -> client.service().messaging()
                .queryMessages(conversationId, null, 1)
                .map(result -> {
                    if (result.isSuccessful() && result.getResult() != null) {
                        return (long) result.getResult().getLatestEventId();
                    }
                    return -1L;
                })
                .flatMap(result -> persistenceController.getConversation(conversationId).map(loaded -> compare(result, loaded)))
                .flatMap(this::updateLocalConversationList)
                .flatMap(result -> lookForMissingEvents(client, result))
                .map(result -> new ChatResult(result.isSuccessful, null)));
    }