2024-02-13 12:34:41 +00:00
|
|
|
; <require-service <daemon simplex_bot_actor>>
|
|
|
|
<depends-on <daemon simplex_bot_actor> <service-state <daemon syndesizer> started>>
|
|
|
|
<depends-on <daemon simplex_bot_actor> <service-state <daemon simplex-chat> started>>
|
2023-09-12 08:07:00 +00:00
|
|
|
|
2024-02-13 12:34:41 +00:00
|
|
|
# $config <require-service <daemon base64_decoder>>
|
2023-10-26 16:24:00 +00:00
|
|
|
|
2023-10-27 23:28:36 +00:00
|
|
|
let ?websocket = dataspace
|
|
|
|
<bind <ref { oid: "websocket" key: #x"" }> $websocket #f>
|
2024-02-13 12:34:41 +00:00
|
|
|
let ?websocketUrl = "ws://127.0.0.1:5225/"
|
|
|
|
|
|
|
|
<bind <ref { oid: "syndicate" key: #x"" }> $config #f>
|
|
|
|
|
|
|
|
? <service-state <daemon simplex-chat> ready> [
|
|
|
|
? <service-object <daemon syndesizer> ?cap> [
|
|
|
|
$cap <websocket { dataspace: $websocket url: $websocketUrl }>
|
|
|
|
]
|
2023-10-27 23:28:36 +00:00
|
|
|
]
|
2023-10-18 16:28:12 +00:00
|
|
|
|
2023-10-27 23:28:36 +00:00
|
|
|
? <simplex ?simplexSpace> [
|
2023-10-18 16:28:12 +00:00
|
|
|
|
2024-02-13 12:34:41 +00:00
|
|
|
$websocket ? <connected $websocketUrl> [
|
|
|
|
? <service-object <daemon simplex_bot_actor> ?cap> [
|
|
|
|
$cap {
|
|
|
|
dataspace: $simplexSpace
|
|
|
|
websocket: $websocket
|
|
|
|
}
|
2023-10-27 23:28:36 +00:00
|
|
|
]
|
2023-10-18 16:28:12 +00:00
|
|
|
]
|
|
|
|
|
2024-02-13 12:34:41 +00:00
|
|
|
? <notifications ?notifyspace> [ ? <socketspace ?socketspace> [
|
2023-10-26 16:24:00 +00:00
|
|
|
|
2023-10-27 23:28:36 +00:00
|
|
|
$simplexSpace ? <chat {chatInfo: { groupInfo: { groupId: ?id } } chatItems: [{content: {msgContent: {text: ?text}}}] }> [
|
|
|
|
$simplexSpace ? <group { groupId: $id localDisplayName: ?name image: ?image }> [
|
2024-02-13 12:34:41 +00:00
|
|
|
$socketspace ? <shaviliterate $text ?trans> [
|
|
|
|
$notifyspace ! <notify $name { body: $trans icon: $image }>
|
|
|
|
]
|
2023-10-27 23:28:36 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
$simplexSpace ? <chat {chatInfo: { groupInfo: { groupId: ?id } } chatItem: {content: {msgContent: {text: ?text}}} }> [
|
|
|
|
$simplexSpace ? <group { groupId: $id localDisplayName: ?name image: ?image }> [
|
2024-02-13 12:34:41 +00:00
|
|
|
$socketspace ? <shaviliterate $text ?trans> [
|
|
|
|
$notifyspace ! <notify $name { body: $trans icon: $image }>
|
|
|
|
]
|
2023-10-27 23:28:36 +00:00
|
|
|
]
|
2023-10-18 16:28:12 +00:00
|
|
|
]
|
2023-10-26 16:24:00 +00:00
|
|
|
|
2023-10-27 23:28:36 +00:00
|
|
|
$simplexSpace ? <chat {chatInfo: { contact: { contactId: ?id } } chatItems: [{content: {msgContent: {text: ?text}}}] }> [
|
2024-02-13 12:34:41 +00:00
|
|
|
$config ? <socketspace ?beepSpace> $beepSpace [
|
|
|
|
! <beep private-message>
|
|
|
|
]
|
2023-10-27 23:28:36 +00:00
|
|
|
$simplexSpace ? <contact { contactId: $id localDisplayName: ?name image: ?image }> [
|
2024-02-13 12:34:41 +00:00
|
|
|
$socketspace ? <shaviliterate $text ?trans> [
|
|
|
|
$notifyspace ! <notify $name { body: $trans icon: $image }>
|
|
|
|
]
|
2023-10-27 23:28:36 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
$simplexSpace ? <chat {chatInfo: { contact: { contactId: ?id } } chatItem: {content: {msgContent: {text: ?text}}} }> [
|
2024-02-13 12:34:41 +00:00
|
|
|
$config ? <socketspace ?beepSpace> $beepSpace [
|
|
|
|
! <beep private-message>
|
|
|
|
]
|
2023-10-27 23:28:36 +00:00
|
|
|
$simplexSpace ? <contact { contactId: $id localDisplayName: ?name image: ?image }> [
|
2024-02-13 12:34:41 +00:00
|
|
|
$socketspace ? <shaviliterate $text ?trans> [
|
|
|
|
$notifyspace ! <notify $name { body: $trans icon: $image }>
|
|
|
|
]
|
2023-10-27 23:28:36 +00:00
|
|
|
]
|
2023-10-18 16:28:12 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
$simplexSpace ? <contact ?id { profile: {displayName: ?displayName }}> [
|
|
|
|
$notifyspace ! <notify $displayName { }>
|
|
|
|
$simplexSpace ? <icon $id ?path> [
|
|
|
|
$notifyspace ! <notify $displayName {icon: $path}>
|
|
|
|
]
|
|
|
|
]
|
2024-02-13 12:34:41 +00:00
|
|
|
] ]
|
2023-10-18 16:28:12 +00:00
|
|
|
|
2023-10-22 19:35:14 +00:00
|
|
|
]
|