bugfixes reply in Friendica 3/2022 and image download

This commit is contained in:
LubuWest 2022-03-13 21:22:08 +01:00
commit 48a904b8c0
15 changed files with 909 additions and 855 deletions

View file

@ -344,19 +344,19 @@ function deleteNews(login,database,newsid,messagetype,rootwindow,callback){
})}
function retweetNews(login,database,newsid,rootwindow,callback){
Helperjs.friendicaPostRequest(login,"/api/statuses/retweet?id="+newsid,"","POST", rootwindow,function (obj){
Helperjs.friendicaPostRequest(login,"/api/v1/statuses/"+newsid+"/reblog","","POST", rootwindow,function (obj){
var answer=JSON.parse(obj);
if(answer.hasOwnProperty('status'))//('error' in answer.status)
{Helperjs.showMessage("Repost",answer.status.code,rootwindow);}
else{Helperjs.showMessage("Repost",answer.text,rootwindow)}
else{Helperjs.showMessage("Repost",answer.content,rootwindow)}
})
}
function favorite(login,favorited,newsid,rootwindow){
// toggle favorites
if(favorited){ Helperjs.friendicaPostRequest(login,"/api/favorites/create?id="+newsid,"","POST", rootwindow,function (obj){
if(favorited){ Helperjs.friendicaPostRequest(login,"/api/v1/statuses/"+newsid+"/bookmark","","POST", rootwindow,function (obj){
})}
else {Helperjs.friendicaPostRequest(login,"/api/favorites/destroy?id="+newsid,"","POST",rootwindow,function (obj){
else {Helperjs.friendicaPostRequest(login,"/api/v1/statuses/"+newsid+"/unbookmark","","POST",rootwindow,function (obj){
})}
}