QuickBlox: how can you clean a group dialog, without deleting it? - chat

The API gives the option of deleting a dialog. Is it possible to clean a dialog (remove all messages) without deleting it?

There is no native way to delete all messages but keep the dialog, but there are two workarounds possible:
1) Write a script that will execute API calls to first retrieve messages of a particular dialog, and then delete these messages;
2) Delete manually via Quickblox admin panel.
Useful links:
Retrieve messages
Delete message

Related

Find Attachments in Azure DevOps REST API for deletion

When I submit an Attachment to the Azure DevOps REST service (create), is there a place I can go to visualise all of the attachments in there? Or is my best course of action to just send a GET which will give me the list?
My problem then becomes...that there is no way for me to delete unwanted attachments.
Is there a place I can go to visualise all of the attachments in
there? Or is my best course of action to just send a GET which will
give me the list?
Yes, the best course of action to view these attachments is to send a GET request.
In fact, after you upload the attachments to a work item via the API, all of them are managed by the backend. The backend does not assign any relevant info to the work item. This leads to the situation where you cannot view them from the UI, unfortunately.
Microsoft hasn't expanded the API/SDK to provide an "attachment delete" call yet.
You can also press F12, then try with uploading and deleting attachments from one workitem within the UI.
As you can see, the attachments deleted are run by the backend via sending an event call. In your scenario, you cannot remove those unwanted attachments until now.
You are not the first one who has requested this feature. See this suggestion: Unable to delete/remove attachment from work item by using VSTS api. You can vote and comment there to raise its priority. The product team can then consider adding the feature to the roadmap.

Retrieving all messages from a facebook page

I'd like to get all messages to and from a facebook page, including those in the "Done" folder.
Using
graph.facebook.com/{page-id}/conversations?fields=id,messages{message,to,from,created_time}
I'm able to retrieve all messages in the inbox, but threads I've marked as "Done" in the web UI are not listed. I can retrieve their messages via
graph.facebook.com/{conversation-id}?fields=id,messages{message,to,from,created_time}
but that requires knowing the conversation-id.
I also know about the conversations webhook. While that's great for realtime and will work for all future messages, it doesn't help with retrieving historical messages, which I also want.
Is there a way to also get the conversation-ids for messages in the "Done" folder of a pages inbox?
Yes.
You can use {page-id}/conversations?folder=page_done with Page Access Token. It retrieves all threads in Done folder of Page inbox.

When to create PFInstallation

I am new to using PFinstallations on Parse, and i am a bit confused as to how they work. I have an app that creates a new installation when a user creates an account, and i set the "User" field of the installation to the users userId so i can send them notifications easily later. I dont understand how the installation works when the user logs out or closes the app. In order to be able to always send the user a notification, must i create new installations periodically when these events (ie. logging out or closing the app) occur?
You shouldn't ever need to create an instance of PFInstallation. The parse framework will handle that for you if you access it using PFInstallation.currentInstallation(). But to save it to the backend, you'll need to call one of the save methods yourself.
By default, logging out will have no impact on the installation since it is a method on the user. You can have you own logic that modifies the installation on logout to, for example, clear the user field or channels.
The parse framework writes the installation to disk on the users device. When the app stops running and then restarts, parse can just read that data from disk and have the proper PFInstallation object again.

CRM 2011, REST, OData and Security Roles

Is there any special security privileges that i need to give my users so that they can run some custom code? I have a javascript library that is triggered on a button click that then gets all of the selected items in a subgrid. When I get all of the check-boxed items I then feed that into an update operation and upload the string if items (in the form of GUIDs) into a Single Line Textbox field on my entity. Once that field is updated they will trigger a dialog which consumes the textbox field and does some more work on it.
The problem is that nothing happens. I solved one issue once I figured out that the user needs Organizational write access to the entity, but now I see another exception "...is missing prvReadWorkflow privilege" does that mean these users need Read Access on Organizational workflows?
Am I missing anything else?
I don't have an explaination for why you require read access to workflows for this update operation, but this microsoft CRM forum post appears to be about the same issue you are having.
Tanguy suggests you add read access to processes for the affected user.

Add email recipient to all new Trac tickets

Is there a configuration change that can be made to Trac to send a notification to an email address only upon the creation of all new tickets? If it can't be done through config, a plugin would be the second best option, with source code modification as a last resort.
NOTE: The setting smtp_always_cc in the notification section of TracIni will send messages on all updates. I'm in need of email notifications only on the creation of a new ticket.
Does this have to be an email notification? One option you have is to create a query that will list the ten (or however many) most recently-created tickets. When looking at the results of the query, use the "RSS Feed" button at the bottom of the page to subscribe to a feed that will notify you whenever the results of that query get updated.
You could write your own ticket listener plugin (or rather, override the default one and tweak it), or write a email filter (procmail?) to remove non-creation mails.
The smtp_always_cc configuration option in trac.ini will do exactly that.
The one caveat is that it will also send an email on any updates to that issue -- not only on issue creation. This may or may not be what you want. See the TracNotification page in the help wiki for more information.
We use this feature in our product at Akiri Solutions.