Skip to content

Commit a3bdf20

Browse files
committed
ignore carbons
1 parent 2e41ea9 commit a3bdf20

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/mod_message_http_post.erl

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,19 @@ log_packet(Direction, #message{type = Type, body = Body, id = Id, from = From, t
133133
"&message=", http_uri:encode(MessageVal)
134134
], ""
135135
),
136-
{ok, _ReqId} = httpc:request(post,
137-
{Url, [], "application/x-www-form-urlencoded", PostData},
138-
[],
139-
[ {sync, false},
140-
{receiver, {?MODULE, post_result, []}}
141-
| [] ]),
142-
?INFO_MSG("log_packet: Url ~s Date ~s Direction ~s Type ~s Message ~s ID ~s From ~s To ~s",
143-
[Url, DateVal, DirectionVal, TypeVal, MessageVal, IdVal, FromVal, ToVal]);
136+
if Type1 == chat ->
137+
{ok, _ReqId} = httpc:request(post,
138+
{Url, [], "application/x-www-form-urlencoded", PostData},
139+
[],
140+
[ {sync, false},
141+
{receiver, {?MODULE, post_result, []}}
142+
| [] ]),
143+
?INFO_MSG("request: Url ~s Date ~s Direction ~s Type ~s Message ~s ID ~s From ~s To ~s",
144+
[Url, DateVal, DirectionVal, TypeVal, MessageVal, IdVal, FromVal, ToVal]);
145+
true ->
146+
?INFO_MSG("log: Date ~s Direction ~s Type ~s Message ~s ID ~s From ~s To ~s",
147+
[DateVal, DirectionVal, TypeVal, MessageVal, IdVal, FromVal, ToVal])
148+
end;
144149
false ->
145150
ok
146151
end.

0 commit comments

Comments
 (0)