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

[NEW] Add internal API to handle room announcements #10396

Merged
merged 5 commits into from
Apr 16, 2018

Conversation

gdelavald
Copy link
Contributor

@gdelavald gdelavald commented Apr 10, 2018

Adds some form of modularity to the Room Announcements so they can be changed easily by other packages and even other Apps.

Room Announcement example:

import { RocketChatAnnouncement } from 'meteor/rocketchat:lib';

const newAnnouncement = new RocketChatAnnouncement({
   room: _rid, // REQUIRED: The room ID which the announcement is set
   message: "New Room Announcement", // REQUIRED: the message displayed, currently does not support markdown
   callback: "myCustomCallback", // OPTIONAL: a callback implemented by your app/feature that triggers when the user clicks the Announcement
   style: "" // OPTIONAL: currently supports the default (when style is null/undefined), warning and error
})
newAnnouncement.save(); //updates the room with the new announcement

Result:
image

With style: "error"
image

With style: "warning"
image

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10396 April 10, 2018 02:17 Inactive
@gdelavald gdelavald temporarily deployed to rocket-chat-pr-10396 April 10, 2018 15:12 Inactive
@gdelavald gdelavald changed the title [WIP] Room announcements API [NEW] Room Announcements module Apr 11, 2018
@karlprieb karlprieb added this to Desireable in 0.64.0 via automation Apr 12, 2018
@karlprieb karlprieb added this to the 0.64.0 milestone Apr 12, 2018
@karlprieb karlprieb moved this from Desireable to Ready to merge in 0.64.0 Apr 12, 2018
@rodrigok rodrigok changed the title [NEW] Room Announcements module [NEW] Add internal API to handle room announcements Apr 16, 2018
@rodrigok rodrigok merged commit 8124a12 into develop Apr 16, 2018
0.64.0 automation moved this from Ready to merge to Done Apr 16, 2018
@rodrigok rodrigok deleted the room-announcements branch April 16, 2018 14:49
@rodrigok rodrigok mentioned this pull request Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
0.64.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants