From 16203cc4e33c310e4348e6a8155202cb62c755c6 Mon Sep 17 00:00:00 2001 From: srosse <none@none> Date: Fri, 11 Jan 2013 15:34:05 +0100 Subject: [PATCH] no-jira: add the thread key to the Message of the Forum REST API --- .../java/org/olat/modules/fo/restapi/MessageVO.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/org/olat/modules/fo/restapi/MessageVO.java b/src/main/java/org/olat/modules/fo/restapi/MessageVO.java index f632b73915c..3199368dc69 100644 --- a/src/main/java/org/olat/modules/fo/restapi/MessageVO.java +++ b/src/main/java/org/olat/modules/fo/restapi/MessageVO.java @@ -43,6 +43,7 @@ import org.olat.restapi.support.vo.FileVO; public class MessageVO { private Long key; + private Long threadKey; private Long forumKey; private Long parentKey; private Long authorKey; @@ -64,6 +65,9 @@ public class MessageVO { public MessageVO(Message message) { key = message.getKey(); + if(message.getThreadtop() != null) { + threadKey = message.getThreadtop().getKey(); + } Identity auth = message.getCreator(); authorKey = auth.getKey(); authorName = auth.getName(); @@ -96,6 +100,14 @@ public class MessageVO { this.key = key; } + public Long getThreadKey() { + return threadKey; + } + + public void setThreadKey(Long threadKey) { + this.threadKey = threadKey; + } + public Long getForumKey() { return forumKey; } -- GitLab