Skip to content

Commit

Permalink
consistenly use plain UID in communication with the plugin (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed May 12, 2022
1 parent 48a0cfd commit 0631fba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3080,7 +3080,7 @@ func (t *Topic) replyDelSub(sess *Session, asUid types.Uid, msg *ClientComMessag
t.evictUser(uid, true, "")

// Notify plugins.
pluginSubscription(&types.Subscription{Topic: t.name, User: uid.UserId()}, plgActDel)
pluginSubscription(&types.Subscription{Topic: t.name, User: uid.String()}, plgActDel)

// If all P2P users were deleted, suspend the topic to let it shut down.
if t.cat == types.TopicCatP2P && t.subsCount() == 0 {
Expand Down Expand Up @@ -3163,7 +3163,7 @@ func (t *Topic) replyLeaveUnsub(sess *Session, msg *ClientComMessage, asUid type
t.evictUser(asUid, true, sess.sid)

// Notify plugins.
pluginSubscription(&types.Subscription{Topic: t.name, User: asUid.UserId()}, plgActDel)
pluginSubscription(&types.Subscription{Topic: t.name, User: asUid.String()}, plgActDel)

// If all P2P users were deleted, suspend the topic to let it shut down.
if t.cat == types.TopicCatP2P && t.subsCount() == 0 {
Expand Down

0 comments on commit 0631fba

Please sign in to comment.