Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

Add getLastNotifications Command (#644) #648

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ezaca
Copy link

@ezaca ezaca commented May 23, 2018

In issue #644 I was discussing a personal need I had. Now I have made a command to fit my needs: it makes a request and gets a list of the last notifications of the currently logged user.

As it is not a Messenger thing, but an FB thing, I don't know if it's expected to be in the official Unofficial Facebook Chat API. I will maintain a fork for a while and use it from that, if you like the function and think it can be somewhat useful, I am opening a pull request.

The initial commit includes source, documentation, and test for the getLastNotification command.

If you are willing to accept the pull request, please review the additions and inform me of any problem related to code, formatting or grammar (English is not my native language).

This commit includes source, documentation and test of the getLastNotifications command, which makes a request to get a list of last notifications from the current logged profile.
@23phy
Copy link

23phy commented May 24, 2018

Is it possible to get more notifications then? Let's say the last 5 for example.

@ezaca
Copy link
Author

ezaca commented May 24, 2018

Hi, @23phy, the "s" in the end is meant to point that it returns a list of notifications. By default, it returns the last 10 notifications, I think it's an arbitrary number. To return older notifications it would be necessary to implement the system of cursors that Facebook uses. If you need last 5, sure it will supply your needs. To use cursors and obtain even older items, it will require little more work.

@23phy
Copy link

23phy commented May 24, 2018

Good. I thought that 's' was a typo 😂I don't know why I understand that it gets the last notification. Thank you for your work..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants