Skip to content
This repository was archived by the owner on Sep 19, 2021. It is now read-only.

Commit c4e2aef

Browse files
committed
Fixed Message Response Failed
The client was expecting the wrong ID so it won't accept any messages from the server.
1 parent 810f2d9 commit c4e2aef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/codeu/chat/client/View.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public Collection<Message> getMessages(Collection<Uuid> ids) {
126126
Serializers.INTEGER.write(connection.out(), NetworkCode.GET_MESSAGES_BY_ID_REQUEST);
127127
Serializers.collection(Uuid.SERIALIZER).write(connection.out(), ids);
128128

129-
if (Serializers.INTEGER.read(connection.in()) == NetworkCode.GET_CONVERSATIONS_BY_ID_RESPONSE) {
129+
if (Serializers.INTEGER.read(connection.in()) == NetworkCode.GET_MESSAGES_BY_ID_RESPONSE) {
130130
messages.addAll(Serializers.collection(Message.SERIALIZER).read(connection.in()));
131131
} else {
132132
LOG.error("Response from server failed.");

0 commit comments

Comments
 (0)