package stud.mi.dachatserver.dto;

import java.util.ArrayList;
import java.util.List;

public class MessageList {

	private String _id = "message_list";
	private String _rev;

	public List<Message> messages = new ArrayList<>();

	@Override
	public String toString() {
		final StringBuilder builder = new StringBuilder();
		builder.append("[\n");
		for (int i = 0; i < messages.size(); i++) {
			builder.append(messages.get(i));
			if (i < messages.size() - 1) {
				builder.append(",");
			}
		}
		builder.append("]");
		return "";
	}

}

@@ -329,16 +329,18 @@
 der();%0D%0A
+%0D%0A
 %09%09builde
@@ -349,16 +349,162 @@
 append(%22
+%7B id: %22);%0D%0A%09%09builder.append(_id);%0D%0A%09%09builder.append(%22,%5Cnrev: %22);%0D%0A%09%09builder.append(_rev);%0D%0A%09%09builder.append(%22,%5CnmsgList: %22);%0D%0A%09%09builder.append(%22  
 %5B%5Cn%22);%0D%0A
@@ -681,16 +681,18 @@
 nd(%22
+  
 %5D%22);%0D%0A%09%09
 retu
@@ -691,17 +691,59 @@
 %0D%0A%09%09
-return %22%22
+builder.append(%22%5Cn%7D%22);%0D%0A%09%09return builder.toString()
 ;%0D%0A%09

fix messagelist