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

Community Global Config System #51

Open
moelrobi opened this issue Jan 4, 2019 · 7 comments
Open

Community Global Config System #51

moelrobi opened this issue Jan 4, 2019 · 7 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@moelrobi
Copy link
Member

moelrobi commented Jan 4, 2019

Community System.

community.join('id'); and community.leave();
So that users dont need to give the Com. Variable at every little Step that they are doing.

@moelrobi moelrobi added enhancement New feature or request help wanted Extra attention is needed labels Jan 4, 2019
@felixfong227
Copy link
Member

What if the users want to perform a community leave operation but with another community?

How about we let the user assign a community ID as the first function param, and if the ID is given then overwrite the default community ID.

And as of the default community ID, the ID will come from the community. join.

And if both default ID and user-specified ID(function params) return null or undefined, we just simply throw an exception?

@moelrobii
Copy link

moelrobii commented Jan 5, 2019 via email

@felixfong227
Copy link
Member

That's actually a quite good idea pal 👍

@moelrobi moelrobi changed the title Project Board Import for 4.0 Release Community Global Config System Mar 6, 2019
@akatsukilevi
Copy link
Contributor

It would be cool. It's not really hard to implement it, since it already have a Global SID config.

@akatsukilevi
Copy link
Contributor

One question
The community.join('id'); set all the modules to work in the given community(if the person isn't on the community, does the person joins it?), but what does community.leave(); should do? Quit the community?

@moelrobi
Copy link
Member Author

let us just say a person want's to check into every community, list all chats, send a message and then exit the process.

the way he would do that would be like this:

const amino = require('amino.js');

//login logic
let coms = amino.getComs();
coms.forEach(com => {
let chats = amino.getJoinedChats(communityID);
chats.forEach(chat => {
amino.sendChat(communityID, [other params]);
})})
process.exit(0);

The way i find it more successful for everyone is the community system:

An Example again:

const amino = require('amino.js');

//login logic
let coms = amino.getComs();
coms.forEach(com => {
community.join(com.id);
let chats = amino.getJoinedChats();
chats.forEach(chat => {
amino.sendChat([other params]);
})
community.leave();
})
process.exit(0);

The Logic behind actually Joining or Leaving Communities would be a totally different one.

@akatsukilevi
Copy link
Contributor

akatsukilevi commented Mar 24, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants