Commit Graph

14 Commits

Author SHA1 Message Date
Luna 53d7515f8c all: update copyright year 2019-01-26 19:25:46 -03:00
Luna 935b4e15aa relationships: add messages to errors
Closes #30
2019-01-24 00:27:10 -03:00
Luna de3c6d00e6 relationships: add RelationshipBlocked
Related to #30.

Fixes parent commit
2018-12-08 18:48:27 -03:00
Luna 6f349d4668 Merge branch 'master' of gitlab.com:litecord/litecord 2018-12-08 18:44:45 -03:00
Luna 69493e6912 relationships: raise RelationshipFailed
this only applies to accounts that are not found.

related to #30
2018-12-08 18:42:40 -03:00
Luna 2632d033fa all: add GPL header 2018-12-07 02:14:58 -03:00
Luna e5c75011da relationships: use intersection op instead of union op 2018-12-06 01:57:34 -03:00
Luna Mendes 11d4b54f87 split Storage into UserStorage
this should help with the amount of methods being tossed in the Storage
class.
2018-11-17 02:14:10 -03:00
Luna Mendes 8e3b5d79ab blueprints.users: use UPSERT when adding/patching a note
- blueprints.users: move get_mutual_friends to relationships blueprint
2018-10-19 12:17:00 -03:00
Luna Mendes cabc31360a blueprints.relationships: fix blocking when rel already exists
- storage: fix block fetch
2018-10-15 15:54:40 -03:00
Luna Mendes 151715943b blueprints.relationships: sub/unsub friends on friend request changes 2018-10-15 15:43:00 -03:00
Luna Mendes 737129bd20 blueprints.channels: fix channel deletion
- blueprints.guilds: fix channel creation
 - blueprints.relationships: add POST /api/v6/users/@me/relationships
 - storage: add Storage.search_user, for ^
 - storage: fix bug with last_message_id returning "None" (as a str)
2018-10-10 17:09:39 -03:00
Luna Mendes 88bc4ceca8 blueprints.relationships: fix dispatches 2018-10-02 19:16:00 -03:00
Luna Mendes c7923da124 relationship support!
friendships and blocks are possible, however presence code isn't ready
to handle presences of people who are friends.

SQL for instances, this is going to fix bad timestamps on the messages:

```sql
ALTER TABLE ONLY members ALTER COLUMN joined_at SET DEFAULT (now() at time zone 'utc');
 ALTER TABLE ONLY messages ALTER COLUMN created_at SET DEFAULT (now() at time zone 'utc');
ALTER TABLE ONLY invites ALTER COLUMN created_at SET DEFAULT (now() at time zone 'utc');
```

After that, rerun the schema.sql file to have the new relationships
table.

 - blueprints: add relationships blueprint
 - enums: add RelationshipType
 - storage: add get_relationships
 - storage: fix bug on lazy guild changes and messages
 - schemas: return validator.document instead of reqjson
 - gateway.websocket: use Storage.get_relationships
2018-10-02 03:43:57 -03:00