Skip to content

Commit

Permalink
fix inbound rate for sms (#6316)
Browse files Browse the repository at this point in the history
  • Loading branch information
lazedo authored Feb 15, 2020
1 parent ce84352 commit 030e0b3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions core/kazoo_im/src/kz_im_offnet.erl
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,11 @@ handle_inbound(JObj, Srv, Deliver) ->
-spec maybe_relay_request(kz_json:object()) -> 'ack' | 'nack'.
maybe_relay_request(JObj) ->
{Number, Inception} = doodle_util:get_inbound_destination(JObj),
IM = kapps_im:from_payload(JObj),
Map = #{number => Number
,inception => Inception
,request => JObj
,route_id => kz_api_sms:route_id(JObj)
,route_type => kz_api_sms:route_type(JObj)
,im => IM
},
Routines = [fun lookup_number/1
,fun number_has_sms_enabled/1
Expand Down Expand Up @@ -354,9 +352,8 @@ reseller_standing_is_acceptable(#{reseller_id := ResellerId} = Map) ->
reseller_standing_is_acceptable(Map) -> Map.

set_rate(#{account_id := AccountId
,im := IM
} = Map) ->
Rate = kz_services_im:flat_rate(AccountId, kapps_im:type(IM), kapps_im:direction(IM)),
Rate = kz_services_im:flat_rate(AccountId, 'sms', 'inbound'),
Map#{rate => Rate};
set_rate(Map) -> Map.

Expand Down

0 comments on commit 030e0b3

Please sign in to comment.