The question is not how the message pushes this piece, but what is the elegant way the content and links of the message are generated?
For example, message notifications in SF.GG
How do the different message types, content, and links come together after a user executes a behavior?
It's hard to put together such strings in your code when you push to Message Queuing:
"xxx回答了你的问题 title"
And then abruptly it in? The front end read it directly?
Is there an elegant way to do this if the message type is more (comments, replies, private messages, systems, etc.)?
Reply content:
The question is not how the message pushes this piece, but what is the elegant way the content and links of the message are generated?
For example, message notifications in SF.GG
How do the different message types, content, and links come together after a user executes a behavior?
It's hard to put together such strings in your code when you push to Message Queuing:
"xxx回答了你的问题 title"
And then abruptly it in? The front end read it directly?
Is there an elegant way to do this if the message type is more (comments, replies, private messages, systems, etc.)?
With object-oriented perspective analysis and design, user,action, URLs are delivered in different field, have very good extensibility, and small front-end limitations
${name}['回答了你的答案','关注了你的问题','修改了你收藏的文章',...][xx.type]${title}
Or
${name}({aa:'回答了你的答案',bb:'关注了你的问题',cc:'修改了你收藏的文章',...})[xx.type]${title}
What do you think
My approach is to set up a template for each type
For example, a comment template is{name}评论了你的文章{title}
The reply template is{name}回复了你的问题{title}
Wait a minute. User reviews trigger related templates, populate placeholders with content to generate a notification message