@@ -114,7 +114,7 @@ def push_message(user_id, messages, headers={})
114
114
115
115
endpoint_path = '/bot/message/push'
116
116
payload = { to : user_id , messages : messages } . to_json
117
- post ( endpoint , endpoint_path , payload , headers . merge ( credentials ) )
117
+ post ( endpoint , endpoint_path , payload , credentials . merge ( headers ) )
118
118
end
119
119
120
120
# Reply messages to a user using replyToken.
@@ -160,7 +160,7 @@ def multicast(to, messages, headers={})
160
160
161
161
endpoint_path = '/bot/message/multicast'
162
162
payload = { to : to , messages : messages } . to_json
163
- post ( endpoint , endpoint_path , payload , headers . merge ( credentials ) )
163
+ post ( endpoint , endpoint_path , payload , credentials . merge ( headers ) )
164
164
end
165
165
166
166
# Send messages to all friends.
@@ -174,7 +174,7 @@ def broadcast(messages, headers={})
174
174
175
175
endpoint_path = '/bot/message/broadcast'
176
176
payload = { messages : messages } . to_json
177
- post ( endpoint , endpoint_path , payload , headers . merge ( credentials ) )
177
+ post ( endpoint , endpoint_path , payload , credentials . merge ( headers ) )
178
178
end
179
179
180
180
# Narrowcast messages to users
@@ -200,7 +200,7 @@ def narrowcast(messages, recipient: nil, filter: nil, limit: nil, headers: {})
200
200
filter : filter ,
201
201
limit : limit
202
202
} . to_json
203
- post ( endpoint , endpoint_path , payload , headers . merge ( credentials ) )
203
+ post ( endpoint , endpoint_path , payload , credentials . merge ( headers ) )
204
204
end
205
205
206
206
def leave_group ( group_id )
0 commit comments