]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_dingaling: use the login as message source when not in component mode. (chat_send)
authorMathieu Rene <mrene@avgs.ca>
Tue, 23 Nov 2010 22:26:32 +0000 (17:26 -0500)
committerMathieu Rene <mrene@avgs.ca>
Tue, 23 Nov 2010 22:26:32 +0000 (17:26 -0500)
src/mod/endpoints/mod_dingaling/mod_dingaling.c

index 480f2bdf52a62835d2b2b241987a272a92df8de3..75329a0848558cae93e7defef9be4fd23d279390 100644 (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';
                                }