@@ -114,7 +114,7 @@ def push_message(user_id, messages, headers={})
114114
115115 endpoint_path = '/bot/message/push'
116116 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 ) )
118118 end
119119
120120 # Reply messages to a user using replyToken.
@@ -160,7 +160,7 @@ def multicast(to, messages, headers={})
160160
161161 endpoint_path = '/bot/message/multicast'
162162 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 ) )
164164 end
165165
166166 # Send messages to all friends.
@@ -174,7 +174,7 @@ def broadcast(messages, headers={})
174174
175175 endpoint_path = '/bot/message/broadcast'
176176 payload = { messages : messages } . to_json
177- post ( endpoint , endpoint_path , payload , headers . merge ( credentials ) )
177+ post ( endpoint , endpoint_path , payload , credentials . merge ( headers ) )
178178 end
179179
180180 # Narrowcast messages to users
@@ -200,7 +200,7 @@ def narrowcast(messages, recipient: nil, filter: nil, limit: nil, headers: {})
200200 filter : filter ,
201201 limit : limit
202202 } . to_json
203- post ( endpoint , endpoint_path , payload , headers . merge ( credentials ) )
203+ post ( endpoint , endpoint_path , payload , credentials . merge ( headers ) )
204204 end
205205
206206 def leave_group ( group_id )
0 commit comments