Squashed 'libertree-model-rb/' changes from 29d31e3..2e0d1c3

2e0d1c3 pool.posts: do not ignore time clause
407c426 clarify table for ordering by id column
1fdde4f bump version
60b97ca optionally restrict pool.posts to public posts
a826524 optionally restrict member.posts to public posts only
74b267c bump version
d628b51 add comment
e816468 clear cached posts on delete/revise
635871d get_full: return nil if post id is invalid
29d5d67 simplify queries
d20a40d fix: member.posts must be in reverse order
709a0e4 Comment.like_by: use cached likes if available
d418535 reduce number of queries
9221033 fix syntax error
dda27c1 bump version
fbce6f8 compare author by id instead of model object
9fa047c cache profiles and member.name_display
c5cab9a cache result of Post.get_full for 60 seconds
71ba7a3 simplify query with sequel syntax
cffec85 fix limit behaviour in cached post.comments
c1c7e5c add timedcache dependency, bump version
026ce09 cache primary key lookups of selected models
595058e implement options on cached post.comments
e94430f recursive data structure: cache post.comments.map(&:post)
1ae3459 tests: speed up comment tests
84a5882 post.comments should accept options
1e620e3 do caching work outside of singleton methods
45d7a11 fix typo in comment
cc06aeb return empty array instead of nil if there are no likes
62a54a2 do not override recursively
c7f708c add method to fetch a post with expanded associations
7c5f322 sequel: enable json serialiser
f7cadc4 Revert "remove unused PostHidden model"
ba1d4c3 simplify query for member.posts
fd8b61a use IsRemoteOrLocal module in Comment model
1d09d6f remove unused PostHidden model
aa80b15 distinguish between 'static' and 'dynamic' query terms
b4c393e tests: add tests that don't ignore the structure of query_components
ed0646a tests: ignore the structure of query_components
8a6a3db remove placeholder hack
c90d04c cache grouping of query parts
19e1baf replace reduce with each to clarify intent
6e89d86 associate affiliations with nodes
be936ae convert JID object to string
b7fe5e1 associate node_sub with node model
75f342d fix comment
ca6a1e7 remove placeholders hack
b80a263 pubsub: models for node, affiliation, node subscription
4d1a58d refactor: one glimpse method for post, comment, message
1eae5ae remove placeholder hack in DELETE expression
02aa594 tests: new test for post.mark_as_unread_by_all
b7bae18 forward DM with new forward-via-email task
3f603c9 only distribute a message when the sender is local
259eef9 nil check: assume db authentication unless otherwise specified
00183c0 DMs: store remote_id
d653701 test: Message.create_with_recipients should create recipient records
98afd7b add test: river queries work with non-ASCII chars
ba6c845 fix message distribution
5bc58ec add tests for Message.create_with_recipients
8b2ce06 restore password reset function for db authentication
eaad382 Fix bug where Post.time_commented was not being persisted to database.
408dee8 remove duplicate 'pg' dependency entry

git-subtree-dir: libertree-model-rb
git-subtree-split: 2e0d1c3bd759cabe535ebdb7478100707600badf
Merge commit '335c34f167fcb633c2e153e7278bcebd417834b1'

Conflicts:
	libertree-model-rb/Gemfile
Squashed 'libertree-backend-rb/' changes from dd1749f..d7cdd70

d7cdd70 update libertree-model
ef8ee6a update libertree-model
d0536dd remove dead code
9da6e7b pubsub: refactor feature not implemented error handling
a048840 pubsub#retrieve-subscriptions: limit to local nodes
993e8c0 pubsub: implement feature 'retrieve-affiliations'
ac92862 update to latest version of blather
22d54e5 pubsub: implement retrieve-subscriptions feature
04d6560 tests: use another workaround around upstream bug
6dad62b disallow empty identities (not just nil)
f3ba9e9 adjust indentation
606b1dd return empty identities/features instead of nil
78d2818 tests: use account factory
433f7ff break out node identities/features rule as separate method
6c6b8f8 disco/pubsub: define features once, register for all
3a363d9 merge identity info for top-level nodes into rule
35fd88d disco: cancel feature registration if nil
db846e8 disco: register dynamic node features along with identities
53c7caa disco: path-dependent features and identities
6ebf63f config: add ssl email setting
412fc8a tests: speed up gateway tests
3b8027f tests: remove unneeded table truncation
e22cf52 disco: don't register empty dynamic identities
3a38900 tests: new disco tests
3ce36e0 tests: define pubsub host's JID once
983b71b tests: only check for subset of disco features
3baf8c0 tests: move LSR abbreviation to spec_helper
4ff744b pubsub: implement disco#info and disco#items for node hierarchy
f24c8b7 disco: wrap info in Identity object in disco module
dee2ae6 disco: support dynamic and per-node identities
b66f6e3 set default authentication method
e86da51 split out service discovery into separate module
8f0b605 pass email params without converting them to JSON first
7bd80f1 update libertree-model (DM forwarding)
7c67d92 new task: forward existing entity via email
00b33e9 rename Email to Email::Simple
456fd07 tests: run setup 'before all' instead of 'before each'
c3ded9c tests: clear accounts and members tables, too
0c9fc48 tests: set account authentication method
4034ed7 tests: simplify account creation
d2a76bc update libertree-model
97dd5c3 customisable websocket port
4cef36c remove commented, unused code
b35d7bb console: expect database configuration as second argument
476a95f DMs: store remote message id
d7db505 fix handling of recipients in message responder
cc71562 update libertree-model: fix DM distribution

git-subtree-dir: libertree-backend-rb
git-subtree-split: d7cdd709d1ee3ad93af5eacd7e008e8ce97dd08e
Merge commit '2d2002136fa599c31210912356396519d277f5a6'
Squashed 'libertree-client-rb/' changes from 2ef50e7..45fe949

45fe949 comments reference post UID in thr:in-reply-to tag
c5d2c6f add a TODO note about future implementation of references
6bfaba9 send along post/comment UID
c453364 DMs: also distribute local message id

git-subtree-dir: libertree-client-rb
git-subtree-split: 45fe949f3c6f12311dcb93729340f87d7f0346af
Merge commit '62dd72ebd9ceb02421c7cd019df08e8518b71069'
Squashed 'libertree-db/' changes from 8760b44..a8c1f55

a8c1f55 DMs: remote_id column to allow tracking of replies

git-subtree-dir: libertree-db
git-subtree-split: a8c1f55d88dbeb2f289d81f4798f32607d9eac23
Merge commit '8c23787c20904193534eab86bcf9dd804d7eee2a'