Skip to content

Commit

Permalink
Rename userEvents -> userStatusEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
nkonev committed Nov 5, 2023
1 parent f3c0d8a commit cc93521
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
34 changes: 17 additions & 17 deletions event/graph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion event/graph/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -220,5 +220,5 @@ type Query {
type Subscription {
chatEvents(chatId: Int64!): ChatEvent!
globalEvents: GlobalEvent!
userEvents(userIds: [Int64!]!): [UserEvent!]!
userStatusEvents(userIds: [Int64!]!): [UserEvent!]!
}
4 changes: 2 additions & 2 deletions event/graph/schema.resolvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func (r *subscriptionResolver) GlobalEvents(ctx context.Context) (<-chan *model.
return cam, nil
}

// UserEvents is the resolver for the userEvents field.
func (r *subscriptionResolver) UserEvents(ctx context.Context, userIds []int64) (<-chan []*model.UserEvent, error) {
// UserStatusEvents is the resolver for the userStatusEvents field.
func (r *subscriptionResolver) UserStatusEvents(ctx context.Context, userIds []int64) (<-chan []*model.UserEvent, error) {
// user online
authResult, ok := ctx.Value(utils.USER_PRINCIPAL_DTO).(*auth.AuthResult)
if !ok {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/ChatList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export default {
return this.tetAtetParticipants
},
onUserStatusChanged(rawData) {
const dtos = rawData?.data?.userEvents;
const dtos = rawData?.data?.userStatusEvents;
if (dtos) {
this.items.forEach(item => {
if (item.tetATet) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/ChatParticipantsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
}
},
onUserStatusChanged(rawData) {
const dtos = rawData?.data?.userEvents;
const dtos = rawData?.data?.userStatusEvents;
if (this.participantsDto?.participants && dtos) {
this.participantsDto.participants.forEach(item => {
dtos.forEach(dtoItem => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/UserList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export default {
return this.items.map(item => item.id);
},
onUserStatusChanged(rawData) {
const dtos = rawData?.data?.userEvents;
const dtos = rawData?.data?.userStatusEvents;
if (dtos) {
this.items.forEach(item => {
dtos.forEach(dtoItem => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/UserProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default {
},
onUserStatusChanged(rawData) {
const dtos = rawData?.data?.userEvents;
const dtos = rawData?.data?.userStatusEvents;
if (dtos) {
dtos?.forEach(dtoItem => {
if (dtoItem.online !== null && this.userId == dtoItem.userId) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/mixins/userStatusMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default (nameForLog) => {
const userIds = this.getUserIdsSubscribeTo();
return `
subscription {
userEvents(userIds:[${userIds}]) {
userStatusEvents(userIds:[${userIds}]) {
userId
online
isInVideo
Expand Down

0 comments on commit cc93521

Please sign in to comment.