xddd
This commit is contained in:
@@ -593,6 +593,9 @@ export default (router, tpl) => {
|
||||
// Large comments would silently drop the notification. The client fetches
|
||||
// the full content via _silentSync; the NOTIFY only needs to trigger the update.
|
||||
const notifyBody = content.length > 500 ? content.substring(0, 500) + '…' : content;
|
||||
const uo = await db`SELECT banner_file, banner_position, banner_size, banner_repeat FROM user_options WHERE user_id = ${req.session.id}`;
|
||||
const bannerOpt = uo[0] || {};
|
||||
|
||||
const livePayload = {
|
||||
type: 'comment',
|
||||
id: commentId,
|
||||
@@ -604,6 +607,10 @@ export default (router, tpl) => {
|
||||
user_id: req.session.id,
|
||||
avatar: req.session.avatar,
|
||||
avatar_file: req.session.avatar_file,
|
||||
banner_file: bannerOpt.banner_file || req.session.banner_file || null,
|
||||
banner_position: bannerOpt.banner_position || req.session.banner_position || null,
|
||||
banner_size: bannerOpt.banner_size || req.session.banner_size || null,
|
||||
banner_repeat: bannerOpt.banner_repeat || req.session.banner_repeat || null,
|
||||
created_at: new Date().toISOString(),
|
||||
username_color: req.session.username_color,
|
||||
display_name: req.session.display_name || null,
|
||||
@@ -631,6 +638,10 @@ export default (router, tpl) => {
|
||||
item_rating_label: ratingLabel,
|
||||
avatar: req.session.avatar,
|
||||
avatar_file: req.session.avatar_file,
|
||||
banner_file: bannerOpt.banner_file || req.session.banner_file || null,
|
||||
banner_position: bannerOpt.banner_position || req.session.banner_position || null,
|
||||
banner_size: bannerOpt.banner_size || req.session.banner_size || null,
|
||||
banner_repeat: bannerOpt.banner_repeat || req.session.banner_repeat || null,
|
||||
username: req.session.user,
|
||||
username_color: req.session.username_color,
|
||||
display_name: req.session.display_name || null,
|
||||
@@ -654,7 +665,11 @@ export default (router, tpl) => {
|
||||
comment: {
|
||||
...newComment[0],
|
||||
content,
|
||||
files: activityFiles
|
||||
files: activityFiles,
|
||||
banner_file: bannerOpt.banner_file || req.session.banner_file || null,
|
||||
banner_position: bannerOpt.banner_position || req.session.banner_position || null,
|
||||
banner_size: bannerOpt.banner_size || req.session.banner_size || null,
|
||||
banner_repeat: bannerOpt.banner_repeat || req.session.banner_repeat || null
|
||||
},
|
||||
xd_score: xdRow?.xd_score ?? null,
|
||||
is_new_subscription
|
||||
|
||||
Reference in New Issue
Block a user