Telegram - Counting messages - debugging

I'd like to count the messages of a specific conversation in Telegram. There should be a way using Telegram Desktop and using the debugmode to save the log information (see https://telegram.wiki/desktop/tdesktopcountingmessages). Unfortunately the count-tag is missing in most cases. Any other ideas?

The easiest way to do this currently is by searching for '+' in the conversation of interest. This will retrieve all messages and you can see the count from the search results. See attached image for an example. This conversation contains 32 messages in total.

Related

How do I use GET /channels/{channel.id}/messages

I want to make a bot to search through a channel and find a random message by a user. To do that, I need to read past messages. I've looked in the documentation and all it says is GET /channels/{channel.id}/messages.
I'm asking: How could I return the contents of a message and the author of the message (if possible).
If you're using discord.py, take a look at channel.history

How to get full Gmail API message when clipped?

Gmail messages are clipped when body is exceeding 102kb. In the UI one can get the entire message with a link in the bottom of the page, however the Gmail API does not display it.
Following the documentation, I did not manage to find any solution whatever the format chosen. The body is well printed but not entire (and no link to read the rest). Am I missing something ?
Short answer : listing messages under threads renders messages with no body limit :)
The documentation does not mention this difference but tried and approved.

Slack API - Number of messages sent by a user

i am trying to use the API to get the total number of messages posted by each user during a certain period. Ideally, I would be able to break the number of messages by the type of channel (public, private, direct messages.) Is this possible? I am looking through the API documentation but haven't found anything. I would be using it to create a script that would automatically generate weekly activity reports.
Thank you for any advice you can provide!
There is no special endpoint for this information as far as I know, but you can generate something similar yourself by looping though all channels and counting the message per user, e.g.
Get list of all channels with conversations.list
Get history of each channel with conversations.history
Count messages per user
Of course your results would not include message from channels, that your bot has no access too (e.g. some private channels, direct message channels).

Efficient way of syncing Gmail Inbox messages using the new Gmail API?

A web application sends an email on behalf of a UserA to UserB, using the new Gmail API (Users.messages: send).
The synchronous response contains threadId, messageId which are stored in the database.
We then query the history API for any changes in user's inbox (Users.history: list).
Is there an efficient way to get all the updates since last sync (new replies, read/unread changes)?
One implementation that we tried was to filter the history API results through a custom label. Unfortunately, we noticed that once a thread/message is tagged with a specific label any subsequent responses are not labeled automatically and new replies are not included in the history API response.
A second approach was to query threads using gmail advanced search for a particular label and date (e.g. after:2014/08/29 label:MY_LABEL). The problem was that gmail does not return threads that were created before 2014/08/29 but had a reply on that date.
Any scalable suggestions would be greatly appreciated.
Not sure I understand here, users.history.list was made exactly for this. Given a previous historyId, you can then call history.list(previousHistoryid), iterate through the results to find all the message Ids that have been updated since the previous historyId. Then call messages.get() on all of those--for any messages you already knew about you can just call format=MINIMAL (to see label updates), and for new messages you can use a different format to get the message content if you need it.

Is it possible to query out all of the "praises" messages from yammer?

Yammer has a feature that allows you to "praise" someone. However, looking at the data that is returned from a "praise" message, it does not appear there is any distinguishing flag or attribute that marks it as a "praise" message. Inside the message, there is an attachment with "type=praise" and then "praised-user-id".
What is the best way to pull this information out of Yammer?
Unfortunately there is no way to pull all praise messages from Yammer at this time. It's worth joining the Yammer Developer Network and tracking updates to the API, but this is not something that I'd expect to see in the near future.
Thinking slightly on a tangent, try using the 'search' API looking for the word 'praised' as this is always in the body. This should return only results containing praised.

Resources