mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #2191 from defnax/share-on-channel
Fixed to use for share on channel as file attachment
This commit is contained in:
commit
346b0dcfc9
@ -127,9 +127,14 @@ void GxsChannelDialog::shareOnChannel(const RsGxsGroupId& channel_id,const QList
|
||||
|
||||
CreateGxsChannelMsg *msgDialog = new CreateGxsChannelMsg(channel_id) ;
|
||||
|
||||
QString txt ;
|
||||
for(QList<RetroShareLink>::const_iterator it(file_links.begin());it!=file_links.end();++it)
|
||||
txt += (*it).toHtml() + "\n" ;
|
||||
if((*it).type() == RetroShareLink::TYPE_FILE)
|
||||
{
|
||||
FileInfo info ;
|
||||
RsFileHash hash( (*it).hash().toStdString()) ;
|
||||
|
||||
msgDialog->addAttachment(hash, (*it).name().toUtf8().constData(), (*it).size(), rsFiles->alreadyHaveFile( hash,info ), RsPeerId()) ;
|
||||
}
|
||||
|
||||
if(!file_links.empty())
|
||||
{
|
||||
@ -137,7 +142,6 @@ void GxsChannelDialog::shareOnChannel(const RsGxsGroupId& channel_id,const QList
|
||||
msgDialog->addSubject(subject);
|
||||
}
|
||||
|
||||
msgDialog->addHtmlText(txt);
|
||||
msgDialog->show();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user