diff options
-rw-r--r-- | activitypub/object.go | 10 | ||||
-rw-r--r-- | databaseschema.psql | 5 | ||||
-rw-r--r-- | views/partials/bottom.html | 2 | ||||
-rw-r--r-- | views/partials/footer.html | 2 | ||||
-rw-r--r-- | views/partials/top.html | 4 |
5 files changed, 13 insertions, 10 deletions
diff --git a/activitypub/object.go b/activitypub/object.go index f01d97d..5b78689 100644 --- a/activitypub/object.go +++ b/activitypub/object.go @@ -1277,7 +1277,7 @@ func (obj ObjectBase) WriteReply() error { } if update { - if err := e.WriteUpdate(); err != nil { + if err := e.WriteUpdate(obj.Published); err != nil { return util.MakeError(err, "WriteReply") } } @@ -1321,21 +1321,21 @@ func (obj ObjectBase) WriteCache() (ObjectBase, error) { if obj.Replies.OrderedItems != nil { for _, e := range obj.Replies.OrderedItems { - e._WriteCache() + e.WriteCache() } } return obj, nil } -func (obj ObjectBase) WriteUpdate() error { +func (obj ObjectBase) WriteUpdate(updated time.Time) error { query := `update activitystream set updated=$1 where id=$2` - if _, err := config.DB.Exec(query, time.Now().UTC().Format(time.RFC3339), obj.Id); err != nil { + if _, err := config.DB.Exec(query, updated, obj.Id); err != nil { return util.MakeError(err, "WriteUpdate") } query = `update cacheactivitystream set updated=$1 where id=$2` - _, err := config.DB.Exec(query, time.Now().UTC().Format(time.RFC3339), obj.Id) + _, err := config.DB.Exec(query, updated, obj.Id) return util.MakeError(err, "WriteUpdate") } diff --git a/databaseschema.psql b/databaseschema.psql index d4b2616..c56457e 100644 --- a/databaseschema.psql +++ b/databaseschema.psql @@ -254,4 +254,7 @@ activity_id varchar(100) CREATE TABLE IF NOT EXISTS locked( actor_id varchar(100), activity_id varchar(100) -);
\ No newline at end of file +); + +ALTER TABLE activitystream ALTER COLUMN content TYPE varchar(4500); +ALTER TABLE cacheactivitystream ALTER COLUMN content TYPE varchar(4500);
\ No newline at end of file diff --git a/views/partials/bottom.html b/views/partials/bottom.html index 35e8c4a..c48821b 100644 --- a/views/partials/bottom.html +++ b/views/partials/bottom.html @@ -6,7 +6,7 @@ <form onsubmit="sessionStorage.setItem('element-closed-reply', true)" id="reply-post" action="/post" method="post" enctype="multipart/form-data"> <input id="reply-name" name="name" type="text" placeholder="Name" maxlength="100"> <input id="reply-options" name="options" type="text" placeholder="Options" maxlength="100"> - <textarea id="reply-comment" name="comment" maxlength="2000" oninput="sessionStorage.setItem('element-reply-comment', document.getElementById('reply-comment').value)"></textarea> + <textarea id="reply-comment" name="comment" maxlength="4500" oninput="sessionStorage.setItem('element-reply-comment', document.getElementById('reply-comment').value)"></textarea> <input id="reply-file" name="file" type="file"> <input id="reply-submit" type="submit" value="Reply" style="float: right;"> <input type="hidden" id="inReplyTo-box" name="inReplyTo" value="{{ .Board.InReplyTo }}"> diff --git a/views/partials/footer.html b/views/partials/footer.html index cfae619..3082d25 100644 --- a/views/partials/footer.html +++ b/views/partials/footer.html @@ -4,7 +4,7 @@ </div> <div style="float: right; margin-bottom: 25px;"> - <p style="font-size: 12px; text-align: right; padding-right: 5px;">v0.1.0</p> + <p style="font-size: 12px; text-align: right; padding-right: 5px;">v0.1.1</p> <span>Theme:</span> <select id="themeSwitcher" onchange="setTheme(this.options[this.selectedIndex].value)"> {{ range .Themes }} diff --git a/views/partials/top.html b/views/partials/top.html index 58944a5..5941d4f 100644 --- a/views/partials/top.html +++ b/views/partials/top.html @@ -28,7 +28,7 @@ {{ end }} <tr> <td><label for="comment">Comment:</label></td> - <td><textarea rows="10" cols="50" id="comment" name="comment" maxlength="2000"></textarea></td> + <td><textarea rows="10" cols="50" id="comment" name="comment" maxlength="4500"></textarea></td> </tr> <tr> <td><label for="file">Image</label></td> @@ -86,7 +86,7 @@ {{ end }} <tr> <td><label for="comment">Comment:</label></td> - <td><textarea rows="10" cols="50" id="comment" name="comment" maxlength="2000"></textarea></td> + <td><textarea rows="10" cols="50" id="comment" name="comment" maxlength="4500"></textarea></td> </tr> <tr> <td><label for="file">Image</label></td> |