mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
some chat fixes
This commit is contained in:
@@ -547,10 +547,15 @@ static switch_status_t do_chat_send(switch_event_t *message_event)
|
||||
hint = switch_event_get_header(message_event, "hint");
|
||||
*/
|
||||
|
||||
proto = switch_event_get_header(message_event, "proto");
|
||||
if (!(proto = switch_event_get_header(message_event, "proto"))) {
|
||||
proto = "global";
|
||||
switch_event_add_header(message_event, SWITCH_STACK_BOTTOM, "proto", proto);
|
||||
}
|
||||
|
||||
|
||||
replying = switch_event_get_header(message_event, "replying");
|
||||
|
||||
if (!switch_true(replying) && !switch_stristr("global", proto)) {
|
||||
if (!switch_true(replying) && !switch_stristr("global", proto) && !switch_true(switch_event_get_header(message_event, "skip_global_process"))) {
|
||||
switch_mutex_lock(loadable_modules.mutex);
|
||||
for (hi = switch_hash_first(NULL, loadable_modules.chat_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
@@ -741,6 +746,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_chat_send_args(const char *dest_prot
|
||||
switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "subject", subject);
|
||||
switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "type", type);
|
||||
switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "hint", hint);
|
||||
switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "skip_global_process", "true");
|
||||
|
||||
if (body) {
|
||||
switch_event_add_body(message_event, "%s", body);
|
||||
|
Reference in New Issue
Block a user