-
Notifications
You must be signed in to change notification settings - Fork 2
change make_channel to take in privacy bool, auto-invite all members … #20
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
base: master
Are you sure you want to change the base?
Conversation
…of group if false and leave empty if true -- issue quantumish#12
quantumish
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few syntax-related pieces of feedback. Also, could you update any calls to this method so that they include this new change? Off the top of my head I think it should just be the call in tests.rs, but probably worth double checking so that things don't crash.
scuttlebutt/src/main.rs
Outdated
| self.db.add_group_channel(gid.0, cid).unwrap(); | ||
| channel = db.get_channel(cid).unwrap(); | ||
| if private { // making the channel private | ||
| make_channel_private(channel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs a semicolon in order to compile
scuttlebutt/src/main.rs
Outdated
| if private { // making the channel private | ||
| make_channel_private(channel) | ||
| } | ||
| else // adding existing users to channel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a bracket?
| else // adding existing users to channel | ||
| let users = self.db.get_group_users(gid.0).unwrap(); | ||
| for user in users { | ||
| self.db.add_channel_member(channel, user).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No close bracket here either
scuttlebutt/src/main.rs
Outdated
| let fixed_name = check_name(name.0.clone()); | ||
| self.db.create_channel(cid, gid.0, auth.0.id, fixed_name.clone()).unwrap(); | ||
| self.db.add_group_channel(gid.0, cid).unwrap(); | ||
| channel = db.get_channel(cid).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be let channel = self.db.get_channel(cid).unwrap();?
|
I just fixed the syntax errors (they were already on my local file, oops) and made it so the tests won't break. The new feature isn't being tested though, so I will write that next. |
…of group if false and leave empty if true -- issue #12