Hi!
There is an error with the implementation of MessageGroup.replaceMessage. Right now, the first condition always returns false because the length of the array of messages is always greater than the index that we need to replace. Besides that, the concatenation preserves the original messages array so, this one increases each time that this method is called.
Hi! There is an error with the implementation of
MessageGroup.replaceMessage
. Right now, the first condition always returns false because the length of the array of messages is always greater than the index that we need to replace. Besides that, the concatenation preserves the originalmessages
array so, this one increases each time that this method is called.My code suggestion: