mod_dingaling: use the login as message source when not in component mode. (chat_send)

This commit is contained in:
Mathieu Rene 2010-11-23 17:26:32 -05:00
parent eb109a85d5
commit 58c28aabc8
1 changed files with 7 additions and 2 deletions

View File

@ -514,8 +514,13 @@ static switch_status_t chat_send(const char *proto, const char *from, const char
from = hint;
} else {
char *p;
ffrom = switch_mprintf("%s+%s", proto, from);
from = ffrom;
if (!(profile->user_flags & LDL_FLAG_COMPONENT)) {
from = ffrom = strdup(profile->login);
} else {
from = ffrom = switch_mprintf("%s+%s", proto, from);
}
if ((p = strchr(from, '/'))) {
*p = '\0';
}