Friendiqa v0.3.2
This commit is contained in:
parent
8cd5905b63
commit
99ae53f624
54 changed files with 2771 additions and 437 deletions
|
@ -358,14 +358,17 @@ function updateContactInDB(login,database,isFriend,contact){// for newstab and f
|
|||
|
||||
function processNews(api,data){
|
||||
try{var newslist=JSON.parse(data)} catch(e){newsBusy.running=false;};
|
||||
if (typeof(newslist)=='undefined'){
|
||||
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)
|
||||
if (data==""){}
|
||||
else if (typeof(newslist)=='undefined'){
|
||||
Helperjs.showMessage(qsTr("Undefined Array Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)
|
||||
}
|
||||
else if (newslist.hasOwnProperty('status')){
|
||||
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)
|
||||
} else if (!(Array.isArray(newslist))){
|
||||
Helperjs.showMessage(qsTr("JSON status Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)
|
||||
}
|
||||
else if (!(Array.isArray(newslist))){
|
||||
replytimer.restart()
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var allcontacts=[];
|
||||
allcontacts=Newsjs.getAllContacts(db,login.username);
|
||||
if (api=="/api/direct_messages/all"){
|
||||
|
@ -389,6 +392,7 @@ function processNews(api,data){
|
|||
newslist[n].user=cleanUser(newslist[n].user);
|
||||
}
|
||||
newslist[n].statusnet_html=newslist[n].msg_html;
|
||||
newslist[n].text=newslist[n].msg;
|
||||
}
|
||||
} else {
|
||||
var chatlist=[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue