Skip to content

Commit

Permalink
patch: electron monetization, removed comments (#1292)
Browse files Browse the repository at this point in the history
* v

* Update satolist.js

* v
  • Loading branch information
maxgithubprofile authored Sep 9, 2024
1 parent 4186b15 commit 9bf49af
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 21 deletions.
53 changes: 34 additions & 19 deletions js/lib/client/sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -1204,36 +1204,51 @@ var pSDK = function ({ app, api, actions }) {

return _.filter(_.map(rawcomments, (c) => {


//if(c.deleted) return

if(!c.msgparsed && !c.msg) return null
/*if(!c.msgparsed && !c.msg) {
if(!c.deleted){
return null
}
}*/

try {
if(c.msgparsed || c.msg) {

c.msgparsed = c.msgparsed || JSON.parse(c.msg)
try {

if(_.isObject(c.msgparsed)){
c.msgparsed.url = clearStringXss(trydecode(c.msgparsed.url || ""));
c.msgparsed = c.msgparsed || JSON.parse(c.msg)

c.msgparsed.message = clearStringXss(trydecode(c.msgparsed.message || "")).replace(/\n{2,}/g, '\n\n')

c.msgparsed.images = _.filter(_.map(c.msgparsed.images || [], function (i) {

return checkIfAllowedImageApply(clearStringXss(trydecode(i)))
}), function(i){return i});
}
if(_.isObject(c.msgparsed)){
c.msgparsed.url = clearStringXss(trydecode(c.msgparsed.url || ""));

else{
c.msgparsed.message = clearStringXss(trydecode(c.msgparsed.message || "")).replace(/\n{2,}/g, '\n\n')

c.msgparsed.images = _.filter(_.map(c.msgparsed.images || [], function (i) {

return checkIfAllowedImageApply(clearStringXss(trydecode(i)))
}), function(i){return i});
}

else{
return null
}



}
catch (e) {
console.error(e)
console.log(c)
return null
}



}
catch (e) {
console.error(e)
console.log(c)
return null
else{
if(!c.deleted){
return null
}
}


Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

"version": "0.8.99",

"versionsuffix": "3",
"versionsuffix": "5",
"cordovaversion": "1.8.99",
"cordovaversioncode": "180993",
"cordovaversioncode": "180995",

"description": "Bastyon desktop application",
"author": "Pocketnet Community <[email protected]>",
Expand Down
3 changes: 3 additions & 0 deletions tpls/index_el.html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@
<script join src="js/lib/pocketnet/btc17.js?v=4"></script>
<script join src="js/lib/pocketnet/buffer.js?v=4"></script>
<script join src="js/lib/client/system16.js?v=4"></script>
<script join src="js/lib/client/monetization.js?v=4"></script>
<script join src="js/lib/client/api.js?v=4"></script>
<script src="js/vendor/pbkdf2.js"></script>
<script src="js/vendor/sha1.js"></script>
Expand Down

0 comments on commit 9bf49af

Please sign in to comment.