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] Adds ability for Rocket.Chat Apps to create discussions #16683

Merged
merged 13 commits into from
Apr 17, 2020

Conversation

marceloschmidt
Copy link
Member

Depends on RocketChat/Rocket.Chat.Apps-engine#229
Converts new apps-engine properties to rocket.chat models

@shiqimei
Copy link
Contributor

Hi @marceloschmidt ! Have you created an app to test if it works? Would you mind sharing the app here? Thanks!

@marceloschmidt
Copy link
Member Author

marceloschmidt commented Mar 31, 2020

The app is not ready yet, but you can easily test it with the following code:

const discussion = await modify.getCreator().startDiscussion()
  .setParentRoom(await read.getRoomReader().getById('your_room_id') as IRoom)
  .setReply(`This is the first message sent in the discussion`)
  .setDisplayName(`Discussion name`)
  .setSlugifiedName(`a_random_id`)
  .setCreator(await read.getUserReader().getById('your_user_id') as IUser);
const rid = await modify.getCreator().finish(discussion);
console.log(rid);

@marceloschmidt
Copy link
Member Author

And you can add a .setParentMessage(await read.getMessageReader().getById('a_message_id') as IMessage) to make it reply to a specific message.

shiqimei
shiqimei previously approved these changes Apr 1, 2020
@d-gubert d-gubert added this to the 3.2.0 milestone Apr 3, 2020
@sampaiodiego
Copy link
Member

just making sure nothing has changed in the past two weeks.. can we go ahead and merge this?

@d-gubert d-gubert changed the title Adds ability for apps to create discussions [NEW] Adds ability for Rocket.Chat Apps to create discussions Apr 17, 2020
@sampaiodiego sampaiodiego merged commit 9cc76d9 into develop Apr 17, 2020
@sampaiodiego sampaiodiego deleted the discussion-create branch April 17, 2020 21:38
gabriellsh added a commit that referenced this pull request Apr 18, 2020
…users_and_rooms

* 'develop' of github.com:RocketChat/Rocket.Chat:
  Bump https-proxy-agent from 2.2.1 to 2.2.4 (#17323)
  [NEW] Adds ability for Rocket.Chat Apps to create discussions (#16683)
  Add possibility to sort the Omnichannel current chats list by column (#17347)
  [IMPROVE] Redesign Administration > Import (#17289)
dudizilla added a commit that referenced this pull request Apr 21, 2020
…nto view-logs

* 'develop' of https://github.com/RocketChat/Rocket.Chat:
  [NEW] Allow to send Agent custom fields through the Omnichannel CRM integration (#16286)
  [FIX] Spotify embed and collapsed (#17356)
  Improve: Better Push Notification code (#17338)
  LingoHub Update 🚀 (#17365)
  [FIX] Allow Screensharing in BBB Iframe (#17290)
  [NEW] Make the header for rooms clickable (#16762)
  Import data pagination (#17355)
  Allow to set a comment when forwarding omnichannel rooms. (#17353)
  [FIX] Web Client memory leak caused by the Emoji library (#17320)
  [FIX] Omnichannel room info panel opening whenever a message is sent (#17348)
  [FIX] New user added by admin doesn't receive random password email (#17249)
  Bump https-proxy-agent from 2.2.1 to 2.2.4 (#17323)
  [NEW] Adds ability for Rocket.Chat Apps to create discussions (#16683)
  Add possibility to sort the Omnichannel current chats list by column (#17347)
  [IMPROVE] Redesign Administration > Import (#17289)
@sampaiodiego sampaiodiego mentioned this pull request Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants