Skip to content

Commit b2eda7b

Browse files
authored
Merge pull request #677 from clansty/fix/friendNudge
fix(milky): friend_nudge user_id is zero
2 parents e972d42 + 4afaa0a commit b2eda7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/milky/transform/event.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,11 @@ export async function transformPrivateMessageEvent(
203203
for (const element of message.elements) {
204204
if (element.grayTipElement?.jsonGrayTipElement?.busiId === '1061') {
205205
const { templParam } = element.grayTipElement.jsonGrayTipElement.xmlToJsonParam
206+
const userId = +message.peerUin || +(await ctx.ntUserApi.getUinByUid(message.peerUid))
206207
return {
207208
eventType: 'friend_nudge',
208209
data: {
209-
user_id: +message.peerUin,
210+
user_id: userId,
210211
is_self_send: templParam.get('uin_str1') === selfInfo.uin,
211212
is_self_receive: templParam.get('uin_str2') === selfInfo.uin,
212213
display_action: templParam.get('action_str'),

0 commit comments

Comments
 (0)