Exec Body Fn should be passed Parent BotAction #43
No reviewers
Labels
No labels
Automated
Backlog
Post_Prototype_1.0
Bot_Code
Core
Bot_Code
Custom
CI/CD
Complexity
Advanced
Complexity
Basic
Complexity
Expert
Complexity
Intermediate
Kind/Breaking
Kind/Bug
Kind/Bug Fix
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Nix
Ownership
Collab
Ownership
Collab with Leads
Ownership
Individual Lead
Ownership
In-Review
Ownership
Needs Owner > May Delegate
Ownership
Workshop with Leads
Phase 1.0
Requirements > Drafting
Phase 1.0
Requirements > Researching
Phase 1.0
Requirements > Review & Planning
Phase 2.0
Design > Research & Analysis
Phase 3.0
Coding > Implementation
Phase 4.0
QA > Unit Testing & Design
Phase 5.0
Resolution > Completed
Phase 5.0
Resolution > Review for Completion
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
modulatingforce/forcebot_rs!43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "parent-botaction-to-child-fn"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Title : Exec Body Fn should be passed Parent BotAction
Passing Parent
BotActionto Child ExecBody functions would allow child functions to access attributes of the BotAction including :At the moment, an example use case I want this is for
Chat.Say()to validate the target channel firstThis is a small blocker of enhanced routine functionality , as Child ExecBodies may want to pull attributes from the Parent Routine . Routine core functionality can run without the changes from this PR
The change would require relatively major refactoring, I believe. In particular, I believe the following areas :
bot_actions.rsPlan of Action :
BotActionstructure in above areas for desired functionalityChat.Say()so it validates Module of Target ChannelBotMsgType:Notiftakes care of some recursive loops I kept seeing with newChatvalidationBotAdminwithout Channel Level Elevated Role (Mod,etc), they must promote themselves first in Both Source & Destination ChannelsAt the moment, I'm able to do this (problem) scenario :
s TestChannelto send a message to the Destination ChannelPotential way to approach,
I should have a way so the roles are checked just in the destination if say message ?
Live Tests - Passed
[x] Test Case > PASSED
Scenario
BotAdminroleSourceChannel, Sender does NOT have anyChannel_ElevatedrolesDestinationChannel, Sender does NOT have anyChannel_ElevatedrolesWorkflow
SaytoDestinationChannel_ElevatedRoles forDesintationNotiftoSource(by usingPrivMsg)Channel_ElevatedRoles forSourceBotAdminRoleNotifby passing toClient.Say()[x] Test Case > PASSED
Scenario
BotAdminroleSourceChannel, Sender does have SOMEChannel_ElevatedrolesDestinationChannel, Sender does NOT have anyChannel_ElevatedrolesWorkflow
SaytoDestinationChannel_ElevatedRoles forDesintationNotiftoSource(by usingPrivMsg)Channel_ElevatedRoles forSourceNotifby passing toClient.Say()[x] Test Case > PASSED
Scenario
BotAdminroleSourceChannel, Sender does NOT have anyChannel_ElevatedrolesDestinationChannel, Sender does NOT have anyChannel_ElevatedrolesWorkflow
SaytoDestinationChannel_ElevatedRoles forDesintationNotiftoSource(by usingPrivMsg)Channel_ElevatedRoles forSourceBotAdminRolereturnwithout anyNotifmessage sent[x] Test Case > PASSED
Scenario
BotAdminroleSourceChannel, Sender does have SOMEChannel_ElevatedrolesDestinationChannel, Sender does NOT have anyChannel_ElevatedrolesWorkflow
SaytoDestinationChannel_ElevatedRoles forDesintationNotiftoSource(by usingPrivMsg)Channel_ElevatedRoles forSourceNotifby passing toClient.Say()[x] Test Case > PASSED
Scenario
BotAdminroleSourceChannel, Sender does NOT have anyChannel_ElevatedrolesDestinationChannel, Sender does have SOMEChannel_ElevatedrolesWorkflow
SaytoDestinationChannel_ElevatedRoles forDesintationSayby passing toClient.Say()[x] Test Case > PASSED
Scenario
BotAdminroleSourceChannel, Sender does have SOMEChannel_ElevatedrolesDestinationChannel, Sender does have SOMEChannel_ElevatedrolesWorkflow
SaytoDestinationChannel_ElevatedRoles forDesintationSayby passing toClient.Say()[x] Test Case > PASSED
Scenario
BotAdminroleSourceChannel, Sender does NOT have anyChannel_ElevatedrolesDestinationChannel, Sender does have SOMEChannel_ElevatedrolesWorkflow
SaytoDestinationChannel_ElevatedRoles forDesintationSayby passing toClient.Say()[x] Test Case > PASSED
Scenario
BotAdminroleSourceChannel, Sender does have SOMEChannel_ElevatedrolesDestinationChannel, Sender does have SOMEChannel_ElevatedrolesWorkflow
SaytoDestinationChannel_ElevatedRoles forDesintationSayby passing toClient.Say()Business Logic :
ChatModule'senum BotMsgTypeAs a Custom or Core Developer, when Sending a Message, I should keep the following in mind
Send a
BotMsgType::Notiftosend_botmsg()if I want to ensure the Roles of the Sender in the Source Channel is Considered first before sending the Notification message to the Source ChannelBotAdminor Channel elevated usersSend a
say()orsay_in_reply_to()that's very similar toClientAPI , but includes passing anExecBodyParamssend_botmsg(), but raises aBotMsgType::Notifin certain scenarios of access control failuresBusiness Logic :
bot_actionsmodule'sstruct ExecBodyParamsAs a Custom or Core Developer, for
BotActions, I could used passedparams::ExecBodyParamsto pull locks or data from common parameters such as thebotor parentBotActionAs a Core Developer , when developing features that require enhancing (adding or adjusting) passed input parameters to ExecBodies , we can just adjust this one area at struct definition, then adjust other areas if required (generally is not required when at least adding more members)
WIP: Exec Body Fn should be passed Parentto Exec Body Fn should be passed ParentBotActionBotActionthisBotCommand #48