修复动态发布与互动问题
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user