Git Product home page Git Product logo

Comments (14)

graywolf336 avatar graywolf336 commented on June 12, 2024 3

Currently there's no issue or pull request to watch, however there is a branch: https://github.com/RocketChat/Rocket.Chat.Apps-engine/tree/usernames-getter which this issue is a good one to watch.

from rocket.chat.apps-engine.

graywolf336 avatar graywolf336 commented on June 12, 2024 2

But it does fix the room.usernames. They used to not have the usernames of the users in the rooms, but it does now.

from rocket.chat.apps-engine.

graywolf336 avatar graywolf336 commented on June 12, 2024

Sadly, there is currently no way to get users which are in a room. :( Rodrigo is currently working on implementing items to allow getting users in a room.

from rocket.chat.apps-engine.

sharpner avatar sharpner commented on June 12, 2024

Thanks for the fast response!

I see.... Well at least we know now that it is planned, so there is something to look forward for :)

from rocket.chat.apps-engine.

graywolf336 avatar graywolf336 commented on June 12, 2024

Yeah, one of my Apps broke in the latest updates (Out of Office) due to the usernames removal, so I feel the pain.

from rocket.chat.apps-engine.

sharpner avatar sharpner commented on June 12, 2024

Oh that's unfortunate. Kinda the basics of a chat though, users and messages :/ But great to hear that someone is working on it! Is there any issue I can subscribe to?

from rocket.chat.apps-engine.

graywolf336 avatar graywolf336 commented on June 12, 2024

1.2.1 has been released, however, it doesn't fix the exact issue reported here.

from rocket.chat.apps-engine.

sharpner avatar sharpner commented on June 12, 2024

thank you very much, that might be enough for us :)

from rocket.chat.apps-engine.

winterstefan avatar winterstefan commented on June 12, 2024

Hi @graywolf336, thank you very much for the changes and keeping us up-to-date!

we are trying create an app that creates a room name dynamically via the usernames, but within the executePreRoomCreateModify we are not able to figure out the usernames.

I tried to update the app @sharpner mentioned.

  1. After upgrading Rocket.Chat to 0.71.0, our app detail page stated 'Failed to fetch'.
  2. After setting the requiredApiVersion in the app.json from ^0.9.13 (found in several existing apps) to ^1.2.1 (Is that correct?), I still got 'Failed to fetch'.

Taking a deeper look, the AppApiManager. listApis() resulted in No app found for the provided id..

Could you give us a hint what might be wrong?

from rocket.chat.apps-engine.

graywolf336 avatar graywolf336 commented on June 12, 2024
  1. Is the App actually installed?
  2. If so, is it activated?
  3. Can you connect with me on our Open Community server, that way we can investigate further..

from rocket.chat.apps-engine.

winterstefan avatar winterstefan commented on June 12, 2024

outdated


  1. Yes 👍
  • It was installed just before I upgraded Rocket.Chat. Then, after having the 'Failed to fetch', I humbly tried to remove the app by dropping it from the rocketchat_app_* mongo collections (uninstall via UI wasn't possible).
  • Then, after a second install (now with the updated requiredApiVersion), the same error appeared.
  1. Correct, it was activated in both cases.
  2. I'll investigate my issue, once again, and come back to you asap - connecting with you via https://open.rocket.chat.

from rocket.chat.apps-engine.

winterstefan avatar winterstefan commented on June 12, 2024

So, I got my app going by bootstrapping it from scratch. 👍

Today, I installed Rocket.Chat 0.72.0-rc.1. As far as I understand, that contains #97 and RocketChat/Rocket.Chat#12680. So I gave it another try. Remember: The main goal is to retrieve the user list of a room before the actual room creation.

So I created a dummy application with the following two hooks (pre & post room creation).

Dummy code

# for both executePreRoomCreateModify & executePostRoomCreateModify
async execute(Pre|Post)RoomCreateModify(room: IRoom, builder: IRoomBuilder, read: IRead, http: IHttp, persistence: IPersistence): Promise<IRoom> {
    read.getRoomReader().getMembers(room.id)
        .then((members: Array<IUser>) =>
            this.getLogger().log([members.map((user: IUser) => user.username).join('-')])
        );

    return room;
}

Result

  • executePreRoomCreateModify - list of all users of my Rocket.Chat instance. incorrect❗️
    • Unfortunately, room.id is undefined (Well, the room hasn't been persisted. So thats reasonable.)
    • It looks like the query (is it Subscriptions.getRoomById()?) then falsely return the full user collection, instead of an empty set
  • executePostRoomCreateModify - list all my room's members. correct

So, now the retrieval of users works - but not for a 'room to be created'. Although I understand, that a db lookup cannot find the room (thus neither the users), I would have been expected a pre room creation hook to receive the incoming data from the client (e.g. a list of plain usernames I sent via the Realtime API).


Do you have a tip of how I might be able to get the plain text version of the incoming data / usernames?

from rocket.chat.apps-engine.

graywolf336 avatar graywolf336 commented on June 12, 2024

@rodrigok or @d-gubert any ideas on how to achieve the above comment?

from rocket.chat.apps-engine.

sharpner avatar sharpner commented on June 12, 2024

the behaviour described by @winterstefan is still happening in v1.3.2.
Any updates on this issue?

from rocket.chat.apps-engine.

Related Issues (20)

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.