Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert 'cc user_ids' to valid format #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/yammer/api/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module Message
# @return [Yammer::ApiResponse]
# @param body [String] Message body
# @param [Hash] opts the options to create a message with
# @option opts [Integer] :cc
# @option opts [Array<Integer>] :cc
# @option opts [Integer] :replied_to_id
# @option opts [Integer] :group_id
# @option opts [Array<Integer>] :direct_to_user_ids
Expand All @@ -35,6 +35,7 @@ module Message
# msg2 = Yammer.create_message('building a yammer client', :replied_to_id => msg.id)
def create_message(body, opts={})
opts[:body] = body
opts[:cc] = "[[user:#{opts[:cc].join("]],[[user:")}]]" if !opts[:cc].nil? && opts[:cc].is_a?(Array)
post("/api/v1/messages", opts)
end

Expand Down