Skip to content

Commit 2ceb715

Browse files
fix bug: add friend sync both recv and send request (#109)
1 parent 5e7956a commit 2ceb715

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/friend/friend.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,15 @@ func (f *Friend) DoNotification(ctx context.Context, msg *sdkws.MsgData) {
193193

194194
func (f *Friend) syncApplication(ctx context.Context, from *sdkws.FromToUserID) error {
195195
if from.FromUserID == f.loginUserID {
196+
if err := f.SyncFriendApplication(ctx); err != nil {
197+
return err
198+
}
196199
return f.SyncSelfFriendApplication(ctx)
197200
// send to me
198201
} else if from.ToUserID == f.loginUserID {
202+
if err := f.SyncSelfFriendApplication(ctx); err != nil {
203+
return err
204+
}
199205
return f.SyncFriendApplication(ctx)
200206
}
201207
return fmt.Errorf("friend application notification error, fromUserID: %s, toUserID: %s", from.FromUserID, from.ToUserID)

0 commit comments

Comments
 (0)