I have an issue with api when calling


Server returns an error:

{"error":"Argument 1 passed to Profile_prefs::getConfigData() must be an instance of Profile, null given, called in \/var\/www\/gnusocial\/local\/plugins\/Qvitter\/classes\/NotificationStream.php on line 46","request":"\/api\/qvitter\/statuses\/notifications.json"}

Sounds related to: that is null.

Are there specialists for helping? Thanks :)

@colegota can you help send the above post to #gnusocial users/devs. The dev of #mastalab is trying to bring #gnusocial support to it's app and needs some help.

@lnxw48a1 @mmn @colegota @up201705417

Thanks. I had a look to this doc but I didn't find something about notifications, and I noticed that the web app makes this call to the plugin.

Is there a way to retrieve notifications like in the web interface?

Okay, just read about what Mastalab is and you definitely shouldn't be using qvitter API given that some instances (like the one I'm using) don't have that plugin installed.

About getting notifications, I've been using @andstatus and it is very competent in notifying me, so I guess maybe that app developer might be able to provide you with the required guidance. Or you can just look for the bit of code handling that on AndStatus, it is FLOSS :)

@diogo @andstatus
I tested with my GNU account but I got empty notifications. I am not sure to understand.

I finally split notifications in three tabs to make calls. I am able to get mentions, reblogs and follows.

Si it doesn't work on my GNU instance? I clicked sync without effects.

Ah, I think I know what is going on...? :thinking:

IIRC, GNU social handles notifications in a very specific way that I haven't studied in detail yet (but intend to this summer). I think you have to go through your timeline so that AndStatus can collected previous notifications, or just accept that only newer marked as read notifications will show up there. Try to trigger a notification and then mark it as read, it should then be added there. Can you confirm this to be expected behaviour?

@mmn Can you add some inside on how notifications are handled? "Unread notifications" are just notifications, which weren't explicitly marked as "read" by a user (using "Mark all as read" button on an "Unread notifications" timeline).
@tom79 @colegota

@andstatus What endpoints are you using for notifications? I have to use three different ones.

@tom79 "statuses/mentions.json" endpoint is the primary source of Notifications in the GNU Social "type of a Social network" and in Twitter. But as I wrote, an activity / note from ANY timeline may be put into "(Unread) Notifications" timelines, if #AndStatus app decides that a User needs to be notified about it. Even from "Search" timelines, which can be made syncable.

@andstatus @thefaico
OK. I will keep using the three endpoints for the moment. Only fav are missing.

@tom79 Sorry for not reading the rest of the thread, but are you sure you've authenticated properly when accessing that URL?
@tom79 Notifications in #AndStatus may actually originate from any downloaded note, from any timeline. The application then decides if any given note is deserved to be notified about (according to user's settings...)
I think that the key difference here between AndStatus and #Mastalab is that AndStatus downloads and analyses _all_ timelines in a background beforehand. All timelines are ready for reading even without Internet connection. Mastalab downloads only a small portion thus having less data to think about. And it requires Internet connection when you click on a notification: you will see nothing without Internet. I like your words "competent in notifying me", thank you :-)
@lnxw48a1 @colegota


Have you looked at the code for andstatus on github?

@alanz I preferred to check calls through elements inspector. Also, it won't explain why the server returns this error.

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!