Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions rocketchat_API/APISections/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ def call_api_get(self, method, api_path=None, **kwargs):
)

def call_api_post(self, method, files=None, use_json=None, **kwargs):
if "text" in kwargs:
kwargs["text"] = kwargs["text"].replace('\\n', '\n')
kwargs["text"] = kwargs["text"].replace('\\r', '\r')
kwargs["text"] = kwargs["text"].replace('\\t', '\t')
kwargs["text"] = kwargs["text"].replace('\\b', '\b')
kwargs["text"] = kwargs["text"].replace('\\f', '\f')
reduced_args = self.__reduce_kwargs(kwargs)
# Since pass is a reserved word in Python it has to be injected on the request dict
# Some methods use pass (users.register) and others password (users.create)
Expand Down
Loading