ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
124 stars 111 forks source link

How to get all notifications? #167

Closed stephanoparaskeva closed 2 years ago

stephanoparaskeva commented 3 years ago

I would like to build a notifications list to show users all notifications, to show user all past notifications and current notification on a tab in my app.

How does one do this?

(Imagine similar to instagram's notifications tab)

ccvlad commented 3 years ago

Unfortunately, we don't have API for this. Could you describe your case more detailed? We will try to help you find a solution

stephanoparaskeva commented 3 years ago

@ccvlad

Ah, ok thank you.

So I'm trying to build something like Instagram's Notification Screen. For example in this screenshot:

Screenshot 2020-12-15 at 17 40 47

Where you can see previous notifications from today, or days gone. How can this be done using connectycube and it's messaging/notification system, what are the possible ways to implement this?

ccvlad commented 3 years ago

You can use our Custom Objects API. It's an online DB where you are able to build your own data structure or schema for data.

ConnectyCube.data.list(className, filters)
ConnectyCube.data.create(className, data)
ConnectyCube.data.update(className, data)
ConnectyCube.data.delete(className, data)

It will not be very easy to do this in application's background, cause you will need to start background process by push notification to init ConnectyCube to call the method ConnectyCube.data.create(className, data).

We use a similar logic for call's history. We store messages via Custom Objects API and have a case when user have missed a call (stores in Custom Objects by push notification in background state).

stephanoparaskeva commented 3 years ago

@ccvlad

No I only need this data for RECEIVER for 1 user:

Screenshot 2020-12-17 at 21 24 49

Example:

For User A, get me 100 last notifications sent TO User A. (Image above is wrong as these are notifications sent BY user A).

stephanoparaskeva commented 3 years ago

@ccvlad @DaveLomber

Can someone help me do this, it is a big blocker for my application. As my app needs a way to view and organise notifications to help users interact with history and accept requests.

ccvlad commented 3 years ago

You can use our Custom Objects API. It's an online DB where you are able to build your own data structure or schema for data.

ConnectyCube.data.list(className, filters)
ConnectyCube.data.create(className, data)
ConnectyCube.data.update(className, data)
ConnectyCube.data.delete(className, data)

It will not be very easy to do this in application's background, cause you will need to start background process by push notification to init ConnectyCube to call the method ConnectyCube.data.create(className, data).

We use a similar logic for call's history. We store messages via Custom Objects API and have a case when user have missed a call (stores in Custom Objects by push notification in background state).

@stephanoparaskeva Store notifications in online DB (Custom Objects) as we do not have the API to get all notifications for user. Also I agree with you that the API to list all notification is the best solution for current case. I will be pushing our BE team to add this feature. It will be useful for us to have this functionality.

We will update you after discuss the issue.

DaveLomber commented 3 years ago

Hi @stephanoparaskeva what kind of app are you building?

I just want to understand what type of notifications should be displayed there

stephanoparaskeva commented 3 years ago

Hi @stephanoparaskeva what kind of app are you building?

I just want to understand what type of notifications should be displayed there

Hi @DaveLomber really sorry! I cannot say here what the app is, I can discuss with you in private if you wish? Email is: stephanokparaskeva@gmail.com

@ccvlad Thank you for this, I only need a single API endpoint that returns all previous and scheduled notifications that were received or are soon to be received for 1 user that can be filtered for last 100 and provided offset/skip.

Let me know when this is available as it will allow me to move to the next stage in my app. 🍻

ccvlad commented 2 years ago

Closed due to inactivity. Please create a new issue if needed.