mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-08 21:07:57 +01:00
added wildcard realtime topic support
This commit is contained in:
1 parent
b1c7a012c5
commit
bc519231d9
1 file changed
+5
-2
+5
-2
@@ -307,8 +307,11 @@ func (api *realtimeApi) broadcastRecord(action string, record *models.Record) er
|
|||||||
subscriptionRuleMap := map[string]*string{
|
subscriptionRuleMap := map[string]*string{
|
||||||
(collection.Name + "/" + cleanRecord.Id): collection.ViewRule,
|
(collection.Name + "/" + cleanRecord.Id): collection.ViewRule,
|
||||||
(collection.Id + "/" + cleanRecord.Id): collection.ViewRule,
|
(collection.Id + "/" + cleanRecord.Id): collection.ViewRule,
|
||||||
collection.Name: collection.ListRule,
|
(collection.Name + "/*"): collection.ListRule,
|
||||||
collection.Id: collection.ListRule,
|
(collection.Id + "/*"): collection.ListRule,
|
||||||
|
// @deprecated: the same as the wildcard topic but kept for backward compatibility
|
||||||
|
collection.Name: collection.ListRule,
|
||||||
|
collection.Id: collection.ListRule,
|
||||||
}
|
}
|
||||||
|
|
||||||
data := &recordData{
|
data := &recordData{
|
||||||
|
|||||||
Reference in new issue
Block a user