MCPcopy Create free account
hub / github.com/Giyn/LiveChat / receivedMsg

Method receivedMsg

src/pers/giyn/LiveChat/client/UserController.java:76–89  ·  view source on GitHub ↗
(String id, String msg, int type)

Source from the content-addressed store, hash-verified

74 }
75
76 public void receivedMsg(String id, String msg, int type) {
77 if (chattingPanel.get(id) == null) {
78 Friend sender = new Friend(id, "匿名");
79 for (Friend fri : this.friendGUI.friendsList) {
80 if (fri.id.equals(id)) {
81 sender.nickName = fri.nickName;
82 sender.state = 1;
83 break;
84 }
85 }
86 chattingPanel.put(id, new ChattingGUI(this, sender));
87 }
88 chattingPanel.get(id).receiveMsg(msg, type);
89 }
90
91 public boolean sendMsg(String id, String msg, int type) throws Exception {
92 client.sendMsg(id, msg, type);

Callers 1

processMethod · 0.80

Calls 1

receiveMsgMethod · 0.80

Tested by

no test coverage detected