xo::db::chat_transcript instproc save_new (public)

 <instance of xo::db::chat_transcript[i]> save_new args [ args... ]

Defined in packages/chat/tcl/xotcl-chat-procs.tcl

Save a new transcript, making sure its creator is granted the necessary operative privileges.

Parameters:
args
Returns:
new transcript id

Partial Call Graph (max 5 caller/called nodes):
%3 permission::grant permission::grant (public) xo::db::chat_transcript instproc save_new xo::db::chat_transcript instproc save_new xo::db::chat_transcript instproc save_new->permission::grant

Testcases:
No testcase defined.
Source code:
if {![info exists :context_id]} {
    set :context_id ${:package_id}
}
::xo::dc transaction {
    set transcript_id [next]
    foreach privilege {edit view delete} {
        permission::grant  -party_id  ${:creation_user}  -object_id ${:transcript_id}  -privilege chat_transcript_${privilege}
    }
}
return $transcript_id
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: