and we officially have email to discussion working
This commit is contained in:
parent
f4376ab5be
commit
a15795519d
2 changed files with 3 additions and 3 deletions
|
|
@ -489,7 +489,7 @@ sub newByEmail {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
my $email = shift;
|
my $email = shift;
|
||||||
my ($id) = $session->dbSlave->quickArray("select userId from userProfileData where fieldName='mail' and fieldData=?",[$email]);
|
my ($id) = $session->dbSlave->quickArray("select userId from userProfileData where fieldName='email' and fieldData=?",[$email]);
|
||||||
my $user = $class->new($session, $id);
|
my $user = $class->new($session, $id);
|
||||||
return undef unless $user->username;
|
return undef unless $user->username;
|
||||||
return $user;
|
return $user;
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ sub addPost {
|
||||||
my $class = (ref $parent eq "WebGUI::Asset::Wobject::Collaboration") ? "WebGUI::Asset::Post::Thread" : "WebGUI::Asset::Post";
|
my $class = (ref $parent eq "WebGUI::Asset::Wobject::Collaboration") ? "WebGUI::Asset::Post::Thread" : "WebGUI::Asset::Post";
|
||||||
foreach my $part (@{$message->{parts}}) {
|
foreach my $part (@{$message->{parts}}) {
|
||||||
if (($part->{type} eq "text/plain" || $part->{type} eq "text/html") && $part->{filename} eq "") {
|
if (($part->{type} eq "text/plain" || $part->{type} eq "text/html") && $part->{filename} eq "") {
|
||||||
my $text = $message->{content};
|
my $text = $part->{content};
|
||||||
if ($part->{type} eq "text/plain") {
|
if ($part->{type} eq "text/plain") {
|
||||||
$text =~ s/\n/\<br \/\>/g;
|
$text =~ s/\n/\<br \/\>/g;
|
||||||
}
|
}
|
||||||
|
|
@ -86,7 +86,7 @@ sub addPost {
|
||||||
menuTitle => $message->{subject},
|
menuTitle => $message->{subject},
|
||||||
url=>$message->{subject},
|
url=>$message->{subject},
|
||||||
content=>$content,
|
content=>$content,
|
||||||
ownerUserId=>$user->getId,
|
ownerUserId=>$user->userId,
|
||||||
username=>$user->profileField("alias") || $user->username,
|
username=>$user->profileField("alias") || $user->username,
|
||||||
});
|
});
|
||||||
if (scalar(@attachments)) {
|
if (scalar(@attachments)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue