put .copy() in send_media - caller shouldn't worry
Denver Gingerich
created
We added group picture message receiving support in d89a1b7, but the
API introduced there (as part of the send_media method) was not ideal
due to the caller having to worry about the deep clone. So instead we
will move the .copy() into send_media() so that it worries about the
deep clone and the caller doesn't have to care.
@@ -118,7 +118,7 @@ module SGXbwmsgsv2
# put URL in the body (so Conversations will still see it)...
msg = Blather::Stanza::Message.new(to, proxy_url)
if m
- msg = m
+ msg = m.copy
msg.body = proxy_url
end
msg.from = from
@@ -928,7 +928,7 @@ class WebhookHandler < Goliath::API
others_num + '@' +
ARGV[0],
bare_jid, media_url,
- nil, nil, msg.copy
+ nil, nil, msg
)
end
end unless not jparams['media']