Skip to content

Commit

Permalink
Merge pull request #801 from The-Commit-Company/798-raven-bots-should…
Browse files Browse the repository at this point in the history
…-ignore-permissions-when-sending-messages

fix: ignore permissions when sending messages via bots
  • Loading branch information
nikkothari22 authored Apr 2, 2024
2 parents ce47fce + 76009c9 commit 5e3b03d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion raven/raven_bot/doctype/raven_bot/raven_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ def send_message(
"link_document": link_document,
}
)
doc.insert()
# Bots can probably send messages without permissions? Upto the end user to create bots.
# Besides sending messages is not a security concern, unauthorized reading of messages is.
doc.insert(ignore_permissions=True)
return doc.name

def create_direct_message_channel(self, user_id: str) -> str:
Expand Down

0 comments on commit 5e3b03d

Please sign in to comment.