diff --git a/src/main/java/de/tum/cit/aet/artemis/communication/domain/AnswerPost.java b/src/main/java/de/tum/cit/aet/artemis/communication/domain/AnswerPost.java index 088865b93ab3..f296068ca110 100644 --- a/src/main/java/de/tum/cit/aet/artemis/communication/domain/AnswerPost.java +++ b/src/main/java/de/tum/cit/aet/artemis/communication/domain/AnswerPost.java @@ -50,17 +50,6 @@ public Boolean doesResolvePost() { return resolvesPost; } - @Column(name = "has_forwarded_messages") - private boolean hasForwardedMessages; - - public boolean getHasForwardedMessages() { - return hasForwardedMessages; - } - - public void setHasForwardedMessages(boolean hasForwardedMessages) { - this.hasForwardedMessages = hasForwardedMessages; - } - public void setResolvesPost(Boolean resolvesPost) { this.resolvesPost = resolvesPost; } diff --git a/src/main/java/de/tum/cit/aet/artemis/communication/domain/Post.java b/src/main/java/de/tum/cit/aet/artemis/communication/domain/Post.java index 9e9a83c607f5..40850b11dd0e 100644 --- a/src/main/java/de/tum/cit/aet/artemis/communication/domain/Post.java +++ b/src/main/java/de/tum/cit/aet/artemis/communication/domain/Post.java @@ -101,9 +101,6 @@ public class Post extends Posting { @Transient private boolean isSaved = false; - @Column(name = "has_forwarded_messages") - private boolean hasForwardedMessages; - @Column(name = "original_answer_id") private Long originalAnswerId; @@ -122,14 +119,6 @@ public void setTitle(String title) { this.title = title; } - public boolean getHasForwardedMessages() { - return hasForwardedMessages; - } - - public void setHasForwardedMessages(boolean hasForwardedMessages) { - this.hasForwardedMessages = hasForwardedMessages; - } - public Boolean isVisibleForStudents() { return visibleForStudents; } diff --git a/src/main/java/de/tum/cit/aet/artemis/communication/domain/Posting.java b/src/main/java/de/tum/cit/aet/artemis/communication/domain/Posting.java index 4ae7c6fe800e..d092340660df 100644 --- a/src/main/java/de/tum/cit/aet/artemis/communication/domain/Posting.java +++ b/src/main/java/de/tum/cit/aet/artemis/communication/domain/Posting.java @@ -60,6 +60,9 @@ public abstract class Posting extends DomainObject { @Transient private UserRole authorRoleTransient; + @Column(name = "has_forwarded_messages") + private boolean hasForwardedMessages; + public String getTokenizedContent() { return tokenizedContent; } @@ -121,4 +124,12 @@ public void setAuthorRole(UserRole authorRole) { public abstract Course getCoursePostingBelongsTo(); public abstract Conversation getConversation(); + + public boolean getHasForwardedMessages() { + return hasForwardedMessages; + } + + public void setHasForwardedMessages(boolean hasForwardedMessages) { + this.hasForwardedMessages = hasForwardedMessages; + } } diff --git a/src/main/webapp/app/shared/metis/posting-reactions-bar/posting-reactions-bar.component.ts b/src/main/webapp/app/shared/metis/posting-reactions-bar/posting-reactions-bar.component.ts index ab17fb43cbf1..6123313abbe7 100644 --- a/src/main/webapp/app/shared/metis/posting-reactions-bar/posting-reactions-bar.component.ts +++ b/src/main/webapp/app/shared/metis/posting-reactions-bar/posting-reactions-bar.component.ts @@ -487,7 +487,7 @@ export class PostingReactionsBarComponent implements OnInit, .subscribe({ next: (conversations) => { conversations.forEach((conversation) => { - if (conversation.type === ConversationType.CHANNEL && !(conversation as ChannelDTO).isAnnouncementChannel) { + if (conversation.type === ConversationType.CHANNEL && !(conversation as ChannelDTO).isAnnouncementChannel && !(conversation as ChannelDTO).isArchived) { this.channels.push(conversation as ChannelDTO); } });