mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
FS-5559 --resolve
This commit is contained in:
parent
a64af62938
commit
be98eb34ab
@ -260,9 +260,22 @@ switch_status_t sofia_presence_chat_send(switch_event_t *message_event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!list) {
|
if (!list) {
|
||||||
|
switch_event_t *event;
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
|
||||||
"Chat proto [%s]\nfrom [%s]\nto [%s]\n%s\nNobody to send to: Profile %s\n", proto, from, to,
|
"Chat proto [%s]\nfrom [%s]\nto [%s]\n%s\nNobody to send to: Profile %s\n", proto, from, to,
|
||||||
body ? body : "[no body]", prof ? prof : "NULL");
|
body ? body : "[no body]", prof ? prof : "NULL");
|
||||||
|
// emit no recipient event
|
||||||
|
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, MY_EVENT_ERROR) == SWITCH_STATUS_SUCCESS) {
|
||||||
|
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Error-Type", "chat");
|
||||||
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Error-Reason", "no recipient");
|
||||||
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Chat-Send-To", to);
|
||||||
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Chat-Send-From", from);
|
||||||
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Chat-Send-Profile", prof ? prof : "NULL");
|
||||||
|
switch_event_add_body(event, body);
|
||||||
|
switch_event_fire(&event);
|
||||||
|
}
|
||||||
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user