Skip to content

Some random changes by me #37

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/main/java/com/team1/chat/interfaces/UserInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface UserInterface
String getPassword();

// Iteration 2
boolean addPrivateChannel(Channel c);
boolean addChannel(Channel c);

boolean deleteChannel(Channel c);

Expand Down Expand Up @@ -52,8 +52,6 @@ public interface UserInterface

boolean declineChannelInvite(Channel c);

String getPublicName();

String getCurrentChannel();

boolean setCurrentChannel(String uid, String cname);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/team1/chat/models/ChatService.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public boolean createChannel(String cname, String aid)
{
return false;
}
u.addPrivateChannel(c);
u.addChannel(c);
c.whiteListUser(aid, u);

return this.getDatabaseSupportInstance().putChannel(c) &&
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/com/team1/chat/models/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ public String getId()
return uid;
}

public String getPublicName()
{
return publicName;
}

public String getUsername()
{
return username;
Expand Down Expand Up @@ -263,7 +258,7 @@ public boolean setCurrentChannel(String uid, String cname){
* @param c Channel to add
* @return true on success
*/
public boolean addPrivateChannel(Channel c)
public boolean addChannel(Channel c)
{
privateChannels.add(c.getName());
return true;
Expand Down