Class: SlackBot::Events::Schemas::Type::Message

Inherits:
JsonSchematize::Generator
  • Object
show all
Defined in:
lib/slack_bot/events/schemas/type/message.rb

Instance Method Summary collapse

Instance Method Details

#made_from_bot?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/slack_bot/events/schemas/type/message.rb', line 37

def made_from_bot?
  !made_from_user?
end

#made_from_user?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/slack_bot/events/schemas/type/message.rb', line 33

def made_from_user?
  bot_profile.nil? || JsonSchematize::EmptyValue === bot_profile
end

#parent_user_idObject



49
50
51
# File 'lib/slack_bot/events/schemas/type/message.rb', line 49

def parent_user_id
  return_nil?(@parent_user_id) ? nil : @parent_user_id
end

#thread_tsObject



45
46
47
# File 'lib/slack_bot/events/schemas/type/message.rb', line 45

def thread_ts
  return_nil?(@thread_ts) ? nil : @thread_ts
end

#tldrObject



41
42
43
# File 'lib/slack_bot/events/schemas/type/message.rb', line 41

def tldr
  "type:#{type}; user:#{user}; channel:#{channel}; ts_id:#{combined_id}"
end