parsav  Diff

Differences From Artifact [3939510d0a]:

To Artifact [7cc6c4467d]:


     1      1   -- vim: ft=terra
            2  +local m = {
            3  +	agentkind = lib.enum {
            4  +		'user', 'circle'
            5  +	};
            6  +}
            7  +
            8  +struct m.agent {
            9  +	kind: m.agentkind.t
           10  +	id: uint64
           11  +}
           12  +
           13  +terra m.eval(expr: lib.str.t, agent: m.agent)
           14  +
           15  +end
           16  +
           17  +terra lib.store.post:save(ctupdate: bool)
           18  +-- this post handles the messy details of registering a post's
           19  +-- circles and actors, and increments the edit-count if ctupdate
           20  +-- is true, which is should be in almost all cases.
           21  +	if ctupdate then
           22  +		self.chgcount = self.chgcount + 1
           23  +		self.edited = lib.osclock.time(nil)
           24  +	end
           25  +	-- TODO extract mentions from body, circles from acl
           26  +	self.source:post_save(self)
           27  +end
           28  +
           29  +return m