Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection::callApi + Room::getPreviousMessages(limit) #54

Merged
merged 2 commits into from
Mar 9, 2017

Conversation

KitsuneRal
Copy link
Member

@KitsuneRal KitsuneRal commented Mar 8, 2017

This PR has two improvements:

Changes are non-intrusive, setting the review deadline to 1 day.

This call (intended to only be used within the lib) creates a job object of the passed type and passes a ConnectionData pointer to its constructor. This allows to avoid making a switchboard of methods on Connection for the whole API, leaving only those that naturally belong there - e.g. joinRoom() or sync() - and moving, e.g., postMessage() to where it belongs - Room. PostMessageJob and RoomMessagesJob were updated along the way, to unbind from the Room class (which they really don't and won't need).
…age()

Also, Room now uses callApi<PostReceiptJob>() instead of postReceipt()
(to allow further removal of postReceipt() from Connection)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant