Reactivate a terminated Lync conversation with the Lync API - api

Using the Lync API with UI Suppression Mode enabled, is it possible to reactivate a one-on-one conversation that has been terminated? In my app, currently, if a user tries to send a message when the conversation state is terminated, I create a new conversation and invite the other user into it. It would be nice if there was a simple way to just reactivate the conversation that was terminated.

Once a conversation is terminated, AFAIK, it's terminated for ever: you can never re-create it.
However, if your application was keeping track of conversations and storing information about them as they terminated, then you could perform this functionality yourself. If a user sends a message and you know of an existing conversation with this user which has since been terminated, you could show the terminated conversation information, whilst connecting the user to the new conversation. To the users of your application it will look like the conversation was never terminated.

Related

Notifications for inactive users

I’m implementing a solution that will notify users in a scenario very similar to a chat.
I’ll be using SignalR and Azure Notifications Hub for the job.
There are two scenarios that I need to address:
Notifying users that are currently connected and using my app - either web or mobile
Notifying users who are NOT currently using the app
I think SignalR will work just fine for the first scenario which is fairly easy.
My question is handling the second scenario which will require Azure Notifications Hub.
In a typical chat app, though it’s not real-time, there’s little delay before an inactive user receives a notification for a new message he receives.
How do I “trigger” a process that will send a notification through Azure Notifications Hub?
I can think of two ways to handle this:
Figure out a way to keep a list of users who currently have an active connection to my app. These users can be notified through SignalR. So after each new message, I could trigger a notification process that will use Azure Notifications Hub for users who are NOT in the active users list i.e. those who are NOT actively connected to my app.
Another approach would be to assume no one is connected. I could create an Azure Functions app that runs every minute to check on messages that are NOT opened. It would then compile a list of users who need to be notified and call Azure Notifications Hub process to notify them.
I don’t want to reinvent the wheel and want to tap into the experience of those who’ve already implemented a solution like this.
I’m currently leaning towards the second approach. I’d appreciate your suggestions, especially on approaches that I haven’t thought of. Thanks!

How to chat and call automatically in MS Teams?

I'm working on a solution to build a system that automatically alerts users on Microsoft Teams. The order of execution will be:
Automatically scan alarm logs
Sort and send MS Teams messages to personnel for corresponding processing
If the processing staff does not receive the message, make a call on MS Teams to read the pre-recorded voice record.
I used python to automatically get the warning list, to send this alert list to the handler, I have tried MS Teams REST API but it only supports sending messages to Channel. How do I automatically chat and voice calls to an MS Teams user? Can chatbot help me with this problem? I see there are many types of bots that can be added to the conversation:
I think a chatbot is definitely the best way to deal with this. Essentially, you're wanting the bot to message a user on demand, which is something called "Proactive Messaging". You can read more here and here. There are a few things you need to know about this, but in a nutshell you need a way to specifically identify the user for sending the message, which you can get when the user first installs your bot (mostly you need "ServiceUrl" and "ConversationId").
With regards to knowing if the user has read the message, you might want to send an "adaptive card" with a button for the user to acknowledge that they've read the message, and if you don't get a callback within some time frame, start the voice call.

RabbitMQ - how to avoid to receive own messages

I am creating a service (accessible via web and app) where users belong to a team. Whenever a user does something, all the other online users (*) in his/her team must be notified. I am evaluating RabbitMQ for this.
(*) Note that it is possible that the same user has multiple sessions at the same time: he could be logged in in different browsers at the same time, or more likely in the browser and and app at the same time.
My current approach is to create a topic exchange for each team:
When a user logs in, an auto-delete queue is created and bound to the exchange of his/her team.
When a user did an update, the backend sends a message to the exchange of the corresponding team.
Finally, all active queues - that is, all active sessions - receive the update message.
This is great, because the update message must only be sent once by the backend. However, the problem here is that the initiator also receives his own update. I would like to avoid that. Is that possible? Or should I have another design?
Ofcourse, I can always add the user identifier of the initiator in the payload of the update message and filter on that field when receiving an update message, but the message is still received.
That is an interesting question. After thinking about this for a while with this particular design, when the user wants to get the update and also make some changes while others should know about it I feel like you need to think of some other design.
With Topic as an Exchange you will always get the notification as the queue is created when you logged into the system. And Topic will broadcast it.
The topic is more for a subscription kind of thing where you can not specify easily where you want to skip one subscription or not.
One design I can think of which is bit complicated is as follow:
Create one Topic Exchange per person in the team.
When another User logs in he will subscribe to the Exchange of all other team members.
When a user makes an update it is sent to his own Exchange where all others are listening.
That way the user will not get his own update as he is listening to others topics.

Strategy for notification checking

Is there a recommended strategy for checking of notifications within my AngularJS app?
By 'notification' I'm talking about message alerts that are to be displayed to a user when they're logged into the application.
My plan is to notify the user of unread notifications in the app's NavBar as shown below:
My app communicates with my restFul API (written using Node.js, express, MongoDB), so I anticipate that new notification will be written to a MongoDB collection with details the user the notification is intended for.
What I'm unsure about is how the AngularJS application will check for notifications once a user is logged on. I could call my API for unread notifications every time the user navigates from one path to another but that seems simplistic and it wouldn't work if a new notification occurs whilst a user is viewing a page.
Another way would be some sort of timer system that checked, say, every 30 seconds. But this would results in unnecessary polling of my API when there aren't any new notification for a user.
So, wondering if there is a recommended strategy. Thanks for your help.
Polling is a solution but it is very inefficient. The solution to your problem are websockets. Websockets is a technology that provides a full-duplex bidirectional communication between your clients and your server. So you can send messages from your server to your connected clients. Your server maintains an array of connected clients and you just have to know which ID you need to send a message to it.
For your stack, the best solution I have came to is Socket.io http://socket.io
It also have cool features. For example, you can "observe" models, so if a model change in your database, for example an update to a user profile is made, you can trigger an event and automagically send a message to your client. This client get and handles the notification and do something, like put a badge on your alerts icon.
Hope this is useful for you.

send notification to a particular user with notification hub - Azure and GCM

I am a software developer in Xamarin - Android, I want to create notification messages. For this purpose I use Azure notification hub, combined with Google's service - Google Cloud Messaging (GCM).
My problem comes when I want to send notification to a particular user. I realized that I need to use the "TAGS" When I compose a new user to the system (Uniqe TAG)
Indeed, it works great, but when the user logged off his account, and then connect to another one (with another TAGS) - the TAGS of his old account are kept in a certain time, and he continues to receive personal messages from the previous account!!!!
Does anyone know what can be done about it?
thank you very much
This is actually an issue a lot of people/apps have on iOS and Android.
What you should do is:
Register your app at your Azure Notification Hub (ANH) on first start and reregister at every app start, to keep registration in sync
If a user logs in, update the registration with an additional tag for this user (e.g. "user:XY")
Sending notifications to that user tag will of course result in notifications on all devices the user is logged in on
If a user logs out, update the registration without the user tag (omit the user tag, so the registration doesn't have user tag anymore afterwards)
The registration will be updated immediately on ANH and sending notifications to the user (tag) will not result in notifications on that specific client
If the user can logout on your app without internet connection, you won't be able to update the registration of course and you will still have the problem of getting notifications for a logged out user. But as soon as another user logs in, the registration should get updated with the new user tag and everything should be fine again...
What you shouldn't do:
"Developers should never unregister the client app as a mechanism for logout or for switching between users..."