How to know that message was deleted? [duplicate] - telegram-bot

This question already has answers here:
handle deleted message by user in telegram bot
(2 answers)
Closed 4 years ago.
Can I receive update where I know that message was deleted? I scrolled through Message object and didn't find such field.
Thanks.

There's no such possibility right now

Related

REST URL convention [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I have an application table that has columns like quoteId, accountNumber, and few others. I have created a REST endpoint to update the account number on the basis of quoteId i.e Update account no. in the application that has quoteId = {quoteId}. Here is the endpoint:
PUT /applications/quotes/{quoteId}/accountNumber
Is it the correct REST convention?
Is it the correct REST convention?
Maybe.
If your PUT/PATCH/POST request uses the same URI as your GET request, then you are probably on safe ground. If PUT/PATCH/POST are using different URI, then something has Gone Wrong somewhere.
In other words, if /applications/quotes/{quoteId}/accountNumber is a resource that you link to, then it is the right idea that you send unsafe requests to that URI.
But if accountNumber is information normally retrieved via /applications/quotes/{quoteId}, then /applications/quotes/{quoteId} should be the target resource for edits (instead of creating a new resource used for editing only).
The reason for this is cache-invalidation, as explained in RFC 7234.
If this isn't immediately clear to you, then I suggest reviewing Jim Webber's 2011 talk on REST.
You should use PATCH instead of PUT for partial object updates.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH
https://www.infoworld.com/article/3206264/how-to-perform-partial-updates-to-rest-web-api-resources.html
In my opinion, your url must be:
PUT /applications/quotes/{quoteId}
payload: {
accountNumber: <number>,
... any other field...
}
Because you only want to update a part of an object of the list of quotes that you identify uniquely with quoteId.
About the use of PUT or PATCH, it's true that PUT means that you want to keep the object as the updated copy that you are sending (you must send in this case the entire object to make the update) but the fact is (I think) that many of us use PUT like you, to do partial updates of object.

To prevent multiple login with same user Id [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I had implement session to store the user id, but after that i realized that only work for single browser not for different browser. I think the session is store in the browser. Do you guys got any idea implement this?
The way I do this is that I log the date/time the user logs in and out of the program/website, for example:
---------------------------------------------------
| username | lastLoggedIn | lastLoggedOut
---------------------------------------------------
| Joe | 06/05/2015, 17:12 | 06/06/2015, 17:16
---------------------------------------------------
| Bob | 04/05/2015, 19:16 | 04/05/2015, 20:21
My code then compares the lastLoggedIn entry with the lastLoggedOut entry; if the lastLoggedOut entry is earlier than the lastLoggedIn entry, then the user is still logged in and we can prevent them logging in again.
To verify this, we need to compare the two entries, firstly splitting them into separate Date and Time variables and then working on the values given.
As the author of the question has pointed out:
what if the user simply closes their browser without logging out
first?
This situation is slightly trickier to handle, but nonetheless doable. I'm unsure for VB.NET, but for C# you are able to catch a browser closing event by using onbeforeunload.
If you're using HTTP Keep Alive (it can be enabled in IIS, see here), simply scan the concurrent server connections for the IP; if it is not found then update the user's lastLoggedOut field.
what if the web server crashes when users are logged in?
Though hopefully you've programmed your web application so that won't happen, a crash or power outage could happen at any time. This does mean that users will still be listed as logged in in the database.
To fix this, simply add a check when the web-app starts up to check for users still listed as logged in; you can then 'log them out' by replacing the entry with a valid one.
For completion, you might also want to dump the members who were 'repaired' by the system into a file so that if any of them have further issues you have an audit trail.

How can i delete a contact from a list with the mailjet api and php? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I use mailjet api to send newsletter, but i don't know how delete a contact from a list.
Please help me.
I'm a developer evangelist here at Mailjet.
The relation between a contactlist and a contact is represented through the listrecipient entity. You can learn more about this in our guide, here:
To remove a contact from a list, you have two options: either DELETE this entity or unsubscribe the contact from the list. The second solution has the advantage to keep the contact's status in the list. It prevents to send unwanted emails to a contact, if for some reason you add it in the list again later.
First, do a GET request to retrieve the ID of the listrecipient entity.
As described in our reference documentation, here, use the Contact and ContactsList filter.
Once you have the ID, you can either run a DELETE request on it to permanently delete the contact in the list or set the IsUnsubscribed property to true to unsubscribe it.

Sitemap re-submission for dynamic website [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I am very new to SEO and trying to explore it reading all day. I have finally created my dream carpooling site and working on the seo aspect now. I want do it on my own so I get to know about SEO better.Its is dynamic website. User post their trip details every day like given below ( IN quotes)
site : www.shareurride.com.au
sitemap: www.shareurride.com.au/sitemap.xml
Trip detail page :
http://www.shareurride.com.au/ridedetails.php?id=MjY3&tripdate=MjAxMy0wNy0wNQ,,
http://www.shareurride.com.au/ridedetails.php?id=MTY2&tripdate=MjAxMy0wNy0wNQ,,
( trips like this will be added regularly everyday)
I have already have a program which dynamically insert this into my sitemap.
My main question is , is that I need to resubmit my site to GOOGLE every day or will it do on its own. ?
Trip detail page is the only page will be dynamically added to sitemap. Please let me know . If I need to resubmit the page regularly ,is there any tools to do that ?
Thanks
is that I need to resubmit my site to GOOGLE every day or will it do on its own. ?
No. Once Google knows where to find your sitemap they will continue to recrawl it periodically.

GitHub API v3 - get last N commits by user on project [duplicate]

This question already has an answer here:
GitHub api to obtain last N number of commits
(1 answer)
Closed 2 years ago.
I'm looking for a way to get the latest N (say 10) commits (the commit messages and time of commit would be enough) a user made on a specific project (repo)? Is there any way to do this with the GitHub API?
The GitHub commits API does not currently support filtering by a specific author or committer login/e-mail address.