SignalR Core Check if users are connected - asp.net-core-signalr

I know that in the old SignalR days that this wasn't possible so you were forced to keep a list of clients that were connected even though it obviously existed.
I'm hoping there is a way to pass an array of user ids (that signalR should be able to match from the authentication claims of users) and have it tell me which ones are online and which are not. The reason why is that we want to send an email if they're not online to receive notifications.
So easy question: Is there a way to get the users that are currently connected?

Nope, there's nothing built in for this

Related

How can the recipient be informed that someone has blocked them on ejabberd?

We are building a chat app using latest ejabberd and there is a use case where user A blocks user B. the requirement is to hide last seen or user's presence from each other. if A blocks B then its easy to hide these information from user A but how can user B be informed that user A has blocked them ? whats the best approach to tell user B the someone has blocked them on realtime while both are in a conversation , like whatsapp does now.
For presence, you do not have to use block, you can simply remove contacts from roster. That way, the other user is notified and can also stop sharing his presence.
There is XEP-0191: Simple Communications Blocking:
https://xmpp.org/extensions/xep-0191.html
https://xmpp.org/extensions/attic/xep-0191-0.2.html
I think it will give you the answers you need. Now it depends how will you implement this functionality using chosen client library like Smack.

What Kind of Service Do I Need to Use for Sending User-to-User Push Notifications on iOS

I need a little help with understanding what to look for when selecting a service to use for allowing my application's users to create accounts and send push notifications to each other. I do not have any backend service experience, except for with Parse, and I don't understand some of the functionality requirements.
I want users to be able to register an account and add other users. Then, I would like the users to be able to select specific users from their "friends" list in order to send a push notification to each selected user for a meeting. However, I honestly don't even know where to start.
It seems that many of the services that I have looked at are set up for sending targeted push notifications to groups of users from a dashboard (seemingly for marketing and other purposes).
I am completely new to servers and backends, except for a little activity with Parse, so can anyone recommend a direction for me to take for integrating such functionality in an iOS application that I am working on?
You can use mbaas providers like built.io backend, It provides push notification functionality on object creation event, and a set of ACL can be specified on these objects. This will act as a filter criteria as to who are the allowed to receive this push notification.
You can refer to their docs here https://docs.built.io

agsxmpp event order

Have a problem with agsXMPP. What I want to do, is connect to openfire server as "User1" (as example), check which users in my roster are online and return collection of ONLINE usernames.
The problem is, that OnPresence event is the last event (based on my research), and it occures for each online user. But how can I know when it has finished checking all the online users, so I could finally return my ONLINE collection?
Is there something like OnPresenceEnd event?
Please help!
no there is nothing like that. The xmpp server sends every presence in its own stanza. And there is nothing in the XMPP protocol which would tell you that all initial presences are received now.
XMPP is an asynchronous protocol. When possible keep your code also asynchronous and update the presence after each OnPresence event.
xcc.OnRosterItem += new agsXMPP.XmppClientConnection.RosterHandler(method_name1);
xcc.OnRosterEnd += new ObjectHandler( method_name2); <---This is what you need

How to check if a person in your iPhone contact list has an app installed?

I want to allow people to privately share data with each other using their contacts list to select people to share with. I'm planning on using Push Notifications to notify others that they have been shared with, but how can I handle those that do not have the app installed?
The cases are that I have their phone # and/or email. I can simply send them a message saying "X wants to share Y with you", but how can I determine if I need to send a Push Notification or an email/text?
If you're looking for API then you're out of luck. You can always collect this personal data server-side with agreement of your users. There you can also manage groups and other community relations.
Check here:
https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html
The crux of it though will be that you will need to store a token when the device is registered anyway to be able to send notifications to them, so you can use that.
And using The Feedback Service alluded to in the documentation, you can remove the token, should it fail too often.
But, as rokjarc said, if you're expecting a third-party API to exist, you're pretty much out of luck. Apple ahs done most of the work for you already anyway.
When the app registeres for push notifications you need to pass additional data to your server. The user could input their own email/phone which will be sent to the server so that users can find each other. The email/phone can be stored alongside with the push token. When someone wants to share something, you would search the corresponding push token in the database and send the notification through APNS. Note there can be multiple push tokens for one email or phone i.e. when a user has multiple devices.
The users of your app should be aware of the data which is stored on your server and should have the option to delete it. Also use the APNS feedback service to detect and remove invalid push tokens.

Which users are currently connected to an Openfire Jabber server?

I have got an Openfire Jabber server with in excess of 75,000 users listed. Of those, 150 or more can be online at any one time.
Is there anywhere that I can collect the JIDs (usernames) of the currently logged in users? I have full database access to the underlying data, but the server does not appear to write the current status back to the DB. Because of the number of users, rosters are not being used.
A very useful set of data being returned would be from a simple (password protected) webpage with one JID per line, optionally with the login time, and maybe also the last time that account performed an action [like send a message]. The latter two are not as essential, but would be useful if the data is available, as well as any other information that was available regarding the user session.
dont know if this will help but I ran into it looking for similar functionality. As defined in XEP-0045 http://xmpp.org/extensions/xep-0045.html#disco-roominfo :
An implementation MAY return a list of existing occupants if that information is publicly
available, or return no list at all if this information is kept private. Implementations
and deployments are advised to turn off such information sharing by default.
So you would need to ensure it works as advertised on Openfire (all xmpp servers ive come across have a bug or two in them), and I imagine you would need to code some logic to get the results.
Good luck.
Not a perfect answer, but the query you want is probably embedded in the session-summary.jsp page. I got to it on a locally hosted server at http://localhost:9090/session-summary.jsp. What I don't know is if that is then stored in the database where it is query-able, or if it is stored internally to the client. The latter is more likely.
The data that page displays is Name, Resource, Status, Presence, Priority, Client IP, and Close Connection.