Hi Support Team ABP!
ABP Framework version: v7.4.4
UI Type:Angular
Database System: MongoDB
Tiered (for MVC) or Auth Server Separated (for Angular): no
We are using chat module for our proejct, it works normally. Due to make compatible to our requirement, we need to extra properties for chat module and also add logic for field and it work fine. However, We know that everytime ABP update to the new version, our code will need to be implement again and may align with the new change from abp
This will increase development cost, so colud you please give us a best practice and step by step guide for resolve this problem
6 Answer(s)
-
0
Hi,
Unfortunately there is no good way.
But there are tools that can help you compare changes to file content: https://winmerge.org/
-
0
Hi liangshiwei! I just want to add 3 more properties (EntityId, EntityCategory, Attachments(is a list of object)) to the Message entity. Please, show me how to do this with extra properties configure?
-
0
-
0
Hi Liangshiwei,
We don’t want to customize the source code as we need to upgrade to the newer abp versions. Does the Chat module support extra properties configuration like other module? If yes, show us how to configure to add more properties to the Message entity. If the Chat module does not support configuring extra properties, please advise us the best way to add more properties to the Message entity so that we could update to the newer abp version without reimplementing to code. Thank you in advance
-
0
Hi,
Does the Chat module support extra properties configuration like other module? If yes, show us how to configure to add more properties to the Message entity. If the Chat module does not support configuring extra properties, please advise us the best way to add more properties to the Message entity so that we could update to the newer abp version without reimplementing to code.
Unfortunately, Chat module does not support extra properties
You can create a new entity instead of extending an existing one:
public class MessageExtras: Entity... { public Guid MessageId { get; set;} // message foreign key public Guid EntityId {get; set;} public string EntityCategory {get; set;} public List<string> Attachments { get; set} }
-
0
Hi,
In your case, I wouldn't recommend extending the chat backend code, but only customizing the UI.
You can download the UI source code and add to your solution: https://docs.abp.io/en/abp/latest/UI/Angular/Component-Replacement
In the UI you can make HTTP requests to your application service, for example:
public class MessageExtrasAppService: ... { public async Task GetMessageExtrasAsync(Guid messageId) { } public async Task UploadAttachmentAsync(...) { } }