Git Product home page Git Product logo

rocket.chat.demo.app's People

Contributors

dudanogueira avatar kunalvrm555 avatar nabhag8848 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rocket.chat.demo.app's Issues

new slash command - increment

A new slash command /increment

  • takes an integer as a subcommand and increments the stored value in persistence storage by that integer.
  • the stored value initially defaults to 0.
  • /increment 2 will increase the value of 0 to 2. Subsequently, /increment 4 will make the stored value 6.
  • /increment reset will reset the stored value back to 0.
  • /increment help will show instructions on usage of the command

Create a helper module for direct messages

Just like the sendMessage and sendNotification helper we need to have a sendDirect helper for the app.
The implementation is already done in the /example command file, we just need to move it to lib directory and use it

required helper modules

To get cleaner code and encourage code reuse, specifically while implementing slash commands, following helper modules are required:

  • sendMessage.ts - to send message in a channel
  • sendNotification.ts - to send notifications in a channel
  • sendDirectMessage.ts - to send direct message to a user through the channel

More helper functions can be listed and implemented, as required, in this list.

[BUG] increment command messages breaking our official guildelines

Description:

  • There are several issues which is breaking our chat messages guidelines provided in documentation, when running all /increment command (with or without argument). The guideline is as follows (highlighted point).

EDIT: UI GUIDELINE: https://developer.rocket.chat/apps-engine/ui-guidelines

Demo App

To be more clear lets walk through:

When running /increment, /increment help and /increment NotANumberSomeRandomText:

  • the message to the channel has been send by the user which is the account owner of rocketchat and it is persistance so it won't get removed when refresh and can be seen by the other users within room. Which is against the guidelines and this is usually not the ideal behaviour of rocket.chat apps for such behaviour commands. Check [Fig 9.1]

When running /increment reset and /increment <number>

  • the message to the channel has been send by the user which is the account owner of rocketchat this is against the guidelines but in this case we must note messages are already persistance and needs to be persistance and as it is and should be visible to other users in the room. Check [Fig 9.2]

To reproduce:

  • Run /increment command with all the above case mentioned and check the resulting message.

Expected behavior:

  • when running /increment, /increment help and /increment NotANumberSomeRandomText message should be send by the AppBot, should not be persistance and should not be visible by the other user of room.
  • when running /increment reset and /increment <number> message should be send by the AppBot.
    NOTE: should be persistance as it is currently and should also be visible by the other user in the room.

Actual behavior:

Screenshot from 2023-02-27 22-56-20

[Fig. 9.1]

Screenshot from 2023-02-28 01-40-38

[Fig. 9.2]

Additional context

  • Willing to fix this one, waiting for your acknowledgement/assign
  • Also do let me know if i misfigured out the feature and do correct me, Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.