修复动态发布与互动问题

This commit is contained in:
2026-06-23 18:43:03 +08:00
parent 702b578e1e
commit cda8685956
151 changed files with 4993 additions and 914 deletions

View File

@@ -37,7 +37,7 @@ exports.main = async event => {
const post = {
authorOpenid: OPENID,
authorId: user._id,
authorSnapshot: { name: user.nickname, avatarKey: user.avatarKey },
authorSnapshot: { name: user.nickname, avatarKey: user.avatarKey, avatarUrl: user.avatarUrl || '' },
petId: event.petId || '',
petSnapshot,
content: content.slice(0, 2000),
@@ -50,7 +50,7 @@ exports.main = async event => {
? { latitude: event.latitude, longitude: event.longitude }
: null,
visibility: event.visibility || 'public',
counts: { likes: 0, comments: 0, shares: 0, favorites: 0 },
counts: { likes: 0, comments: 0, shares: 0 },
createdAt: now,
updatedAt: now
}