marcinadd / projecty-web

Project management software based on spring
GNU General Public License v3.0
76 stars 76 forks source link

Add reply to message #16

Closed marcinadd closed 5 years ago

allanmoso commented 5 years ago

I can probably do this.

@marcinadd what do you have in mind here? The simpliest thing I can think of is adding a replyToId on the Message.

A different approach would be to create a different construct for "Thread" that will group messages once a reply happens.

marcinadd commented 5 years ago

Since the app uses ORM, a better option for me is to add private Message replyToMessage to Message class. We assume that one message can have one reply. Then you can to the repository something to get all messages where replyToMessage is null and you will get beautifully grouped messages. This is only my suggestion I don't know if it is the best. However, maybe you will have better ones.