fixes issues with token being wrongly passed as the owner, instead of
current session user (ie. frappe.session.user), which in turn causes the
following issue:
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 57, in application
response = frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 61, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1042, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/chat/doctype/chat_room/chat_room.py", line 203, in create
room.save(ignore_permissions = True)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 272, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 295, in _save
self.insert()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 223, in insert
self._validate_links()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 756, in _validate_links
frappe.LinkValidationError)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 364, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red')
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 350, in msgprint
_raise_exception()
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 316, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.LinkValidationError: Could not find Owner: 0a4d6eb7763ef2065f44ece0653d829a1ba189f753562ab9ac261620
also fixes issue where the chat rooms do not load because of wrongly
passed parameters
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>