You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## [1.4.0] - 2024-11-21
#### [@rickypid](https://github.com/rickypid)
⚠️⚠️ **Need schema migration** ⚠️⚠️
### Improvements
* Now when we get the rooms the `rooms_l` view is used so that we can get all the information without having to do multiple queries
### Fixed
* Fixed#20 Chat creator role is null instead of admin
* Fixed online user status realtime subscription
Copy file name to clipboardExpand all lines: doc/docs/guides/supabse-views.md
+62-23Lines changed: 62 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,30 +5,69 @@ title: Database Views
5
5
6
6
## Rooms view
7
7
8
-
This is a view of `rooms` table, this view allows you to obtain the name of the sender of the message dynamically in direct rooms, based on the logged-in user the name of the correspondent is displayed.
8
+
This is a view of `rooms` table, this view allows you to obtain the name of the sender of the message dynamically in direct rooms, based on the logged-in user the name of the correspondent is displayed, it is also included the list of uses member objects.
9
9
10
10
```sql
11
-
DROPVIEW IF EXISTS chats.rooms_l;
12
-
createviewchats.rooms_l
13
-
WITH (security_invoker='on') as
14
-
select
15
-
r.id,
16
-
r."imageUrl",
17
-
r.metadata,
18
-
case
19
-
when r.type='direct'andauth.uid() is not null then
0 commit comments