Skip to content
This repository was archived by the owner on Apr 12, 2026. It is now read-only.

Commit 6a395a3

Browse files
Added NotificationV2 and Group Events to Pipeline Tutorial (#134)
* Added NotificationV2 and Group Events NotificationV2 Events: notification-v2 notification-v2-update notification-v2-delete Group Events: group-joined group-left group-member-updated group-role-updated * Fix some NotificationV2 things
1 parent 75c4802 commit 6a395a3

1 file changed

Lines changed: 150 additions & 0 deletions

File tree

content/tutorials/websocket.markdown

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,85 @@ A "`clear-notification`" event is sent when the client should clear **all** noti
9090
}
9191
```
9292

93+
#### About NotificationV2 Events
94+
95+
The `version` property of the `content` of these events all currently have the value `2`.
96+
97+
#### notification-v2
98+
A "`notification-v2`" event carries a NotificationV2 object.
99+
100+
```json
101+
{
102+
"type": "notification-v2",
103+
"content": {
104+
"id": ":notificationId",
105+
"version": 2, // Appears to be a static marker
106+
"type": ":notificationV2TypeEnum", // One of: "group.announcement", ???
107+
"category": ":notificationV2CategoryEnum", // One of: "social.group", ???
108+
"isSystem": <boolean>,
109+
"ignoreDND": <boolean>,
110+
"senderUserId": ":userId", // NOTE: WILL BE NULL if the notification didn't originate from a user
111+
"senderUsername": ":username", // NOTE: same as "senderUserId"
112+
"receiverUserId": ":userId",
113+
"relatedNotificationsId": ":?Id", // gpos_00000000-0000-0000-0000-000000000000
114+
"title": ":string",
115+
"message": ":string",
116+
"imageUrl": ":assetUrl",
117+
"link": ":notificationLinkUri", // The scheme is the type of the linked object, and the path is the id of that object, e.g.: "group:grp_00000000-0000-0000-0000-000000000000"
118+
"linkText": ":string",
119+
"responses": [
120+
{
121+
"type": ":notificationV2ResponseTypeEnum", // One of: "delete", "unsubscribe", ???
122+
"data": ":string", // Auxiliary data
123+
// If the type is "delete", then this will be empty
124+
// If the type is "unsubscribe", then this will be the id of the sending object, a comma, and the id of the (recieving) user
125+
// e.g.: grp_00000000-0000-0000-000000000000,usr_00000000-0000-0000-000000000000
126+
"icon": ":notificationV2ResponseIconEnum", // One of: "check", "bell-slash", ???
127+
"text": ":string"
128+
}
129+
],
130+
"expiresAt": "dateTimeString", // yyyy-mm-ddThh:mm:ss.sssZ
131+
"expiryAfterSeen": <number>, // Typically 900
132+
"requireSeen": <boolean>,
133+
"seen": <boolean>,
134+
"canDelete": <boolean>,
135+
"createdAt": ":dateTimeString",
136+
"updatedAt": ":dateTimeString"
137+
}
138+
}
139+
```
140+
141+
#### notification-v2-update
142+
A "`notification-v2-update`" event is sent when the client should update a notification, overwriting at least one property.
143+
144+
```json
145+
{
146+
"type": "notification-v2-update",
147+
"content": {
148+
"id": ":notificationId",
149+
"version": 2,
150+
"updates": {
151+
// These properties are to be overwrite the properties found in the content of a `notification-v2` event
152+
}
153+
}
154+
}
155+
```
156+
157+
#### notification-v2-delete
158+
A "`notification-v2-delete`" event is sent when the client should delete one or more notifications.
159+
160+
```json
161+
{
162+
"type": "notification-v2-delete",
163+
"content": {
164+
"ids": [
165+
":notificationId"
166+
],
167+
"version": 2
168+
}
169+
}
170+
```
171+
93172
---
94173

95174
### Friend Events
@@ -271,3 +350,74 @@ A "`user-location`" event is sent when the user has changed instances.
271350
}
272351
}
273352
```
353+
354+
---
355+
356+
### Group Events
357+
358+
#### group-joined
359+
A "`group-joined`" event is sent when the user has either joined a group, or has had one of their group join requests accepted.
360+
361+
```json
362+
{
363+
"type": "group-joined",
364+
"content": {
365+
"groupId": ":groupId" // grp_00000000-0000-0000-000000000000
366+
}
367+
}
368+
```
369+
370+
371+
#### group-left
372+
A "`group-left`" event is sent when the user has either left a group, or has been removed from a group.
373+
374+
```json
375+
{
376+
"type": "group-left",
377+
"content": {
378+
"groupId": ":groupId"
379+
}
380+
}
381+
```
382+
383+
384+
#### group-member-updated
385+
A "`group-member-updated`" event is sent when something regarding the user's group membership changes. Note that the `member` object is **not** a full GroupMember object, even though it has similarities. It's missing `user`, `createdAt`, `bannedAt`, and `managerNotes`. It also has the extra `lastPostReadAt` field.
386+
387+
```json
388+
{
389+
"type": "group-member-updated",
390+
"content": {
391+
"member": {
392+
"id": ":groupMemberId", // gmem_00000000-0000-0000-000000000000
393+
"groupId": ":groupId",
394+
"userId": ":userId",
395+
"isRepresenting": <boolean>,
396+
"roleIds": [
397+
":groupRoleId" // grol_00000000-0000-0000-000000000000
398+
],
399+
"joinedAt": ":dateTimeString", // yyyy-mm-ddThh:mm:ss.sssZ
400+
"membershipStatus": ":groupMembershipEnum", // One of: "member", ???
401+
"visibility": ":groupVisibilityEnum", // One of: "visible", ???
402+
"isSubscribedToAnnouncements": <boolean>,
403+
"lastPostReadAt": ":dateTimeString" // NOTE: WILL BE NULL if the user hasn't read any group posts
404+
}
405+
}
406+
}
407+
```
408+
409+
410+
#### group-role-updated
411+
A "`group-role-updated`" event is sent when something regarding one of the user's group's roles changes.
412+
413+
```json
414+
{
415+
"type": "group-role-updated",
416+
"content": {
417+
"role": {
418+
// <GroupRole Object>, See return data of Groups API:
419+
// https://vrchatapi.github.io/docs/api/#get-/groups/-groupId-/roles
420+
}
421+
}
422+
}
423+
```

0 commit comments

Comments
 (0)