Skip to content

Commit

Permalink
KAZOO-5589 remove protocol (2600hz#3867)
Browse files Browse the repository at this point in the history
  • Loading branch information
lazedo authored and k-anderson committed Jun 28, 2017
1 parent cf8ab9f commit be179ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions applications/omnipresence/src/omnip_subscriptions.erl
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,14 @@ code_change(_OldVsn, State, _Extra) ->
%%--------------------------------------------------------------------
-spec subscribe_to_record(kz_json:object()) -> subscription().
subscribe_to_record(JObj) ->
{P, U, [Username, Realm]} = omnip_util:extract_user(kz_json:get_value(<<"User">>, JObj)),
{P, F, _} = omnip_util:extract_user(kz_json:get_value(<<"From">>, JObj, <<>>)),
{_, U, [Username, Realm]} = omnip_util:extract_user(kz_json:get_value(<<"User">>, JObj)),
{_, F, _} = omnip_util:extract_user(kz_json:get_value(<<"From">>, JObj, <<>>)),
Version = case kz_json:get_value(<<"Subscription-ID">>, JObj) of
'undefined' -> 1;
_Else -> 2
end,
#omnip_subscription{user=U
,from=F
,protocol=P
,expires=expires(JObj)
,normalized_user=kz_term:to_lower_binary(U)
,normalized_from=kz_term:to_lower_binary(F)
Expand Down Expand Up @@ -305,7 +304,6 @@ subscription_to_json(#omnip_subscription{user=User
,stalker=Stalker
,expires=Expires
,timestamp=Timestamp
,protocol=Protocol
,username=Username
,realm=Realm
,event=Event
Expand All @@ -325,7 +323,6 @@ subscription_to_json(#omnip_subscription{user=User
,{<<"stalker">>, Stalker}
,{<<"expires">>, Expires}
,{<<"timestamp">>, Timestamp}
,{<<"protocol">>, Protocol}
,{<<"username">>, Username}
,{<<"realm">>, Realm}
,{<<"event">>, Event}
Expand Down
1 change: 0 additions & 1 deletion applications/omnipresence/src/omnipresence.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
,stalker :: api_binary() | '_' | '$2' % amqp queue to publish updates to
,expires = 0 :: non_neg_integer() | '_' | '$2'
,timestamp = kz_time:current_tstamp() :: gregorian_seconds() | '_' | '$1'
,protocol = <<"sip">> :: ne_binary() | '_' % protocol
,username :: api_binary() | '_'
,realm :: api_binary() | '_'
,normalized_user :: api_binary() | '_' | '$1'
Expand Down

0 comments on commit be179ac

Please sign in to comment.