class BotFramework::Activity

Attributes

action[RW]

ContactAdded/Removed action

attachment_layout[RW]

AttachmentLayout - hint for how to deal with multiple attachments Values: [list|carousel] Default:list

attachments[RW]

Attachments

channel_data[RW]

Channel specific payload

channel_id[RW]

ChannelId the activity was on

conversation[RW]
entities[RW]

Collection of Entity objects, each of which contains metadata about this activity. Each Entity object is typed.

from[RW]

Sender address

history_disclosed[RW]

the previous history of the channel was disclosed

id[RW]

Id for the activity

locale[RW]

The language code of the Text field

members_added[RW]

Array of address added

members_removed[RW]

Array of addresses removed

recipient[RW]

(Outbound to bot only) Bot's address that received the message

reply_to_id[RW]

the original id this message is a response to

service_url[RW]

Service endpoint

summary[RW]

Text to display if you can't render cards

text[RW]

Content for the message

text_format[RW]

Format of text fields [plain|markdown] Default:markdown

timestamp[RW]

Time when message was sent

topic_name[RW]

Conversations new topic name

type[RW]

The type of the activity [message|contactRelationUpdate|converationUpdate|typing]

Public Class Methods

swagger_types() click to toggle source

Attribute type mapping.

# File lib/bot_framework/models/activity.rb, line 70
def self.swagger_types
  {
    type: :String,
    id: :String,
    timestamp: :DateTime,
    service_url: :String,
    channel_id: :String,
    from: :ChannelAccount,
    conversation: :ConversationAccount,
    recipient: :ChannelAccount,
    text_format: :String,
    attachment_layout: :String,
    members_added: :'Array<ChannelAccount>',
    members_removed: :'Array<ChannelAccount>',
    topic_name: :String,
    history_disclosed: :BOOLEAN,
    locale: :String,
    text: :String,
    summary: :String,
    attachments: :'Array<Attachment>',
    entities: :'Array<Entity>',
    channel_data: :Object,
    action: :String,
    reply_to_id: :String
  }
end

Public Instance Methods

reply(message) click to toggle source
# File lib/bot_framework/models/activity.rb, line 97
def reply(message)
  return false if type != 'message'
  new_activity = Activity.new(type: 'message',
                              locale: 'en',
                              text: message,
                              from: recipient.to_hash)
  Conversation.new(service_url).reply_to_activity(conversation.id, id, new_activity)
end