-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: unreadMessageCount in List and updated to unreadMessages
- Loading branch information
1 parent
6dcea3e
commit ca713a3
Showing
7 changed files
with
39 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/com/chat/yourway/mapper/BaseMessageMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.chat.yourway.mapper; | ||
|
||
import com.chat.yourway.model.Contact; | ||
import com.chat.yourway.model.Message; | ||
import lombok.RequiredArgsConstructor; | ||
import org.mapstruct.Context; | ||
import org.mapstruct.Named; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Named("BaseMessageMapper") | ||
@Component | ||
@RequiredArgsConstructor | ||
public class BaseMessageMapper { | ||
@Named("isMyMessage") | ||
public boolean isMyMessage(Message message, @Context Contact me) { | ||
return message.getSender().equals(me); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters