Modifications in Rocket.chat codebase - shubhsherl/Rocket.Chat GitHub Wiki
Articles package
app/articles
contains the server-side modification code to integrate Ghost in Rocket.chat.
Files Added
-
app/articles/server/api/api.js
Restivus for creating incoming callbacks for announcing post for published articles. Announcement token is used to verify the callbacks from the correct server(similar to the incoming callback in RC).[processWebhookMessage](https://github.com/RocketChat/Rocket.Chat/blob/develop/app/lib/server/functions/processWebhookMessage.js)
is used to send message in the announcing room with the message received from Ghost server. -
app/articles/server/methods/admin.js
Meteor method used to set-up Ghost and navigate to admin panel of Ghost. -
app/articles/server/methods/user.js
Meteor functions:
- redirectUserToArticles: To redirect the user if he/she is a member of Ghost. If not a member, try to create an account and then redirect.
- redirectToUsersArticles: To redirect to user's articles page where all the public published articles can be viewed.
(Maybe deprecated)
Similar to the outgoing triggerHandler Outgoing callback is implemented which keep in sync the user deletion.
-
app/articles/server/logoutCleanUp.js
To ensure that the ghost session is deleted after user logout from the RC. -
app/articles/server/settings.js
Add setting fields for articles in admin panel. -
app/articles/server/utils/ghostAPI.js
Class to interact with ghost API to create user, setup ghost, and executetrigger Url for outgoing callbacks. -
app/discussion/server/methods/createDiscussion.js
Added at
parameter in API call which allows to create public discussion using API call.