Module: Teams

Defined in:
lib/teams/cards/generated.rb,
lib/teams.rb,
lib/teams/app.rb,
lib/teams/cards.rb,
lib/teams/errors.rb,
lib/teams/router.rb,
lib/teams/version.rb,
lib/teams/activity.rb,
lib/teams/rack_app.rb,
lib/teams/response.rb,
lib/teams/api/model.rb,
lib/teams/api/token.rb,
lib/teams/api/client.rb,
lib/teams/auth/token.rb,
lib/teams/api/account.rb,
lib/teams/http_stream.rb,
lib/teams/common/retry.rb,
lib/teams/graph/client.rb,
lib/teams/api/team_info.rb,
lib/teams/common/hashes.rb,
lib/teams/api/task_module.rb,
lib/teams/api/team_client.rb,
lib/teams/api/tenant_info.rb,
lib/teams/api/user_client.rb,
lib/teams/activity_context.rb,
lib/teams/api/channel_data.rb,
lib/teams/api/channel_info.rb,
lib/teams/api/meeting_info.rb,
lib/teams/api/team_details.rb,
lib/teams/function_context.rb,
lib/teams/api/sent_activity.rb,
lib/teams/cloud_environment.rb,
lib/teams/api/activity_value.rb,
lib/teams/api/meeting_client.rb,
lib/teams/auth/jwt_validator.rb,
lib/teams/auth/token_manager.rb,
lib/teams/common/http_client.rb,
lib/teams/api/reaction_client.rb,
lib/teams/api/typing_activity.rb,
lib/teams/api/message_activity.rb,
lib/teams/cards/generated_base.rb,
lib/teams/storage/memory_store.rb,
lib/teams/api/message_extension.rb,
lib/teams/api/notification_info.rb,
lib/teams/api/bot_sign_in_client.rb,
lib/teams/api/citation_appearance.rb,
lib/teams/api/conversation_client.rb,
lib/teams/api/meeting_participant.rb,
lib/teams/api/quoted_reply_entity.rb,
lib/teams/api/conversation_account.rb,
lib/teams/api/paged_members_result.rb,
lib/teams/api/conversation_resource.rb,
lib/teams/api/conversation_reference.rb,
lib/teams/auth/client_secret_credentials.rb,
lib/teams/api/meeting_notification_response.rb

Overview

Generated by script/generate_cards.rb from script/cards_ir.json. DO NOT EDIT MANUALLY - regenerate after upstream teams.py updates.

Defined Under Namespace

Modules: Api, Auth, Cards, CloudEnvironments, Common, Graph, Storage Classes: Activity, ActivityContext, App, AuthenticationError, BadRequestError, CloudEnvironment, ConfigurationError, Error, FunctionContext, GraphError, HttpError, HttpStream, RackApp, Response, Router, StreamCancelledError, StreamNotAllowedError, StreamTimedOutError, TerminalStreamError

Constant Summary collapse

VERSION =
"2.0.1"
PUBLIC_CLOUD =
CloudEnvironment.new(
  login_endpoint: "https://login.microsoftonline.com",
  login_tenant: "botframework.com",
  bot_scope: "https://api.botframework.com/.default",
  token_service_url: "https://token.botframework.com",
  open_id_metadata_url: "https://login.botframework.com/v1/.well-known/openidconfiguration",
  token_issuer: "https://api.botframework.com",
  graph_scope: "https://graph.microsoft.com/.default"
)

Class Method Summary collapse

Class Method Details

.to_threaded_conversation_id(conversation_id, message_id) ⇒ Object

Constructs a threaded conversation ID by appending ";messageid=message_id", the format the Teams service uses to route messages to a specific thread.

Raises:

  • (ArgumentError)


60
61
62
63
64
65
66
67
68
69
# File 'lib/teams.rb', line 60

def self.to_threaded_conversation_id(conversation_id, message_id)
  raise ArgumentError, "conversation_id must be a non-empty String" if conversation_id.to_s.empty?

  message_id = message_id.to_s
  unless message_id.match?(/\A\d+\z/) && message_id != "0"
    raise ArgumentError, %(invalid message_id "#{message_id}": must be a non-zero numeric value)
  end

  "#{conversation_id.split(";").first};messageid=#{message_id}"
end