Search in sources :

Example 1 with Message

use of co.aurasphere.botmill.fb.model.outcoming.message.Message in project fb-botmill by BotMill.

the class AttachmentMessageBuilder method build.

/**
	 * {@inheritDoc} Returns a response containing an {@link Attachment}.
	 */
public FbBotMillResponse build(MessageEnvelope envelope) {
    User recipient = getRecipient(envelope);
    Message message = new AttachmentMessage(attachment);
    message.setQuickReplies(quickReplies);
    return new FbBotMillMessageResponse(recipient, message);
}
Also used : User(co.aurasphere.botmill.fb.model.base.User) FbBotMillMessageResponse(co.aurasphere.botmill.fb.model.outcoming.message.FbBotMillMessageResponse) Message(co.aurasphere.botmill.fb.model.outcoming.message.Message) AttachmentMessage(co.aurasphere.botmill.fb.model.outcoming.message.AttachmentMessage) AttachmentMessage(co.aurasphere.botmill.fb.model.outcoming.message.AttachmentMessage)

Example 2 with Message

use of co.aurasphere.botmill.fb.model.outcoming.message.Message in project fb-botmill by BotMill.

the class TextMessageBuilder method build.

/**
	 * {@inheritDoc} Returns a response containing a plain text message.
	 */
public FbBotMillResponse build(MessageEnvelope envelope) {
    User recipient = getRecipient(envelope);
    Message message = new TextMessage(messageText);
    message.setQuickReplies(quickReplies);
    return new FbBotMillMessageResponse(recipient, message);
}
Also used : User(co.aurasphere.botmill.fb.model.base.User) FbBotMillMessageResponse(co.aurasphere.botmill.fb.model.outcoming.message.FbBotMillMessageResponse) Message(co.aurasphere.botmill.fb.model.outcoming.message.Message) TextMessage(co.aurasphere.botmill.fb.model.outcoming.message.TextMessage) TextMessage(co.aurasphere.botmill.fb.model.outcoming.message.TextMessage)

Aggregations

User (co.aurasphere.botmill.fb.model.base.User)2 FbBotMillMessageResponse (co.aurasphere.botmill.fb.model.outcoming.message.FbBotMillMessageResponse)2 Message (co.aurasphere.botmill.fb.model.outcoming.message.Message)2 AttachmentMessage (co.aurasphere.botmill.fb.model.outcoming.message.AttachmentMessage)1 TextMessage (co.aurasphere.botmill.fb.model.outcoming.message.TextMessage)1