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

Feature: Modify SendMessage function to take a models.Message parameter instead of a string #26

Open
ZakiChammaa opened this issue Mar 26, 2019 · 1 comment

Comments

@ZakiChammaa
Copy link
Contributor

ZakiChammaa commented Mar 26, 2019

Hi!

The function SendMessage(channel *models.Channel, text string) in realtime/messages.go currently takes a string and creates a models.Message variable in the function before sending it. This really limits what we can send to rocket.chat (we need to send attachments with the message for example).

I propose the following:

  • Implement a feature to modify this function so that it takes a models.Message parameter instead of a string.
  • Implement a new function called NewMessage(channel *models.Channel, text string) in realtime/messages.go that returns a basic message with a RoomID, a Msg, and an ID based on the function newRandomId().

Please let me know what you think about each of the above points. I can start working on a PR as soon as you approve these propositions.

Thanks!

@debdutdeb
Copy link
Member

This issue can be closed now.

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

No branches or pull requests

2 participants