fix deleting the photo

This commit is contained in:
or-else
2021-08-10 18:13:21 -07:00
parent 47e7632399
commit 9a2e0519d3
5 changed files with 18 additions and 10 deletions
+7 -3
View File
@@ -1216,10 +1216,14 @@ class TinodeWeb extends React.Component {
const params = {};
let attachments;
if (pub) {
params.public = pub;
if (pub.photo && pub.photo.ref) {
attachments = [pub.photo.ref];
if (pub.photo) {
if (pub.photo.ref && pub.photo.ref != Tinode.DEL_CHAR) {
attachments = [pub.photo.ref];
} else if (!pub.photo.data || pub.photo.data == Tinode.DEL_CHAR) {
pub.photo = Tinode.DEL_CHAR;
}
}
params.public = pub;
}
if (priv) {
params.private = (priv === Tinode.DEL_CHAR) ?
+8 -4
View File
@@ -5744,11 +5744,15 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
let attachments;
if (pub) {
params.public = pub;
if (pub.photo && pub.photo.ref) {
attachments = [pub.photo.ref];
if (pub.photo) {
if (pub.photo.ref && pub.photo.ref != (tinode_sdk__WEBPACK_IMPORTED_MODULE_4___default().DEL_CHAR)) {
attachments = [pub.photo.ref];
} else if (!pub.photo.data || pub.photo.data == (tinode_sdk__WEBPACK_IMPORTED_MODULE_4___default().DEL_CHAR)) {
pub.photo = (tinode_sdk__WEBPACK_IMPORTED_MODULE_4___default().DEL_CHAR);
}
}
params.public = pub;
}
if (priv) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long