Commit Graph

  • e2e68c51ba - Removing old client test code in favor of new structure + Moving tests to the new client - Removing web/ module ! Currently all tests are passing 17/17 but the real trickery comes with doing this on CI which should will likely take some magic somewhere Or we'll just extend the freechat docker image to finally have all the required dependancies and just test on that with diesel and what not shockrah 2021-04-21 21:38:25 -0700
  • 9ab9cdb176 + db-lib::Channel::get added and Returns a Result<Option<Channel>> for simplicity This is really only for check if a particular channel exists for /messages/recent's backend shockrah 2021-04-21 21:33:30 -0700
  • 432e94054f Fixing minor errors that were preventing tests fro mbeing ran oops :p shockrah 2021-04-21 17:23:00 -0700
  • 38ff0edd39 ! Massive test suite overhaul see details below ! shockrah 2021-04-21 17:22:16 -0700
  • c4d7eb9111 * api::channels::list_channels has more relevant docs Better matching against return types so we're not throwing away errors This just entails swapping the if let for a match statement shockrah 2021-04-21 17:14:33 -0700
  • ef73b39f4f + Adding db-lib::common::try_error_passthrough This is more heavily used in Message::send as a way of discerning "real" server errors from those that are caused by user input. The name itself might not be super fitting either shockrah 2021-04-21 16:08:23 -0700
  • 52676cdd1f - Removing /messages/from_id as its no longer usable with the new id generation model shockrah 2021-04-20 12:09:05 -0700
  • bb2201c00e ! First pass base implementation for /messages/recent This api method is made for clients to easily say "give me the n[1,100] latest messages in some channel This commit contains code that is largely untested but contains some base code such that I can correct issues in the next _tested_ commit shockrah 2021-04-17 15:55:10 -0700
  • 591e993329 + Adding cache handler for adding lots of messages from one server call + Better error logging in cache shockrah 2021-04-15 19:57:13 -0700
  • 68e22e1b38 - removing uninportant things shockrah 2021-04-14 22:58:03 -0700
  • 40351f934e + New cache ipc handlers for adding server caches Interface for this is fiddly and probably requires real docs to be further developed without losing my mind doc the whole cache at some point + New cache ipc handlers for adding a new open web socket Web socket comes with some basic listeners, however very litte/nothing is being done check the health of these connections or to try when possible. shockrah 2021-04-14 22:51:35 -0700
  • 01c245cbba Ignoring more compiled js and building new events module shockrah 2021-04-14 22:48:41 -0700
  • 522890fa00 + rtc::new_message now takes a Pool ref to make the second call for the user name ! Start taking public user params like this in the JWT to reduce on network hits It's cheap and reliable enough but the idea just now came to me so do that at some point shockrah 2021-04-14 22:46:31 -0700
  • 894a5bae34 - Removing more behavior from the cache for complexity reduciton + Cache is no longer contained in app structure This should let us later throw this into an Arc<Mutex<>> for better async support. ! Also more cache access safety is being done on the front end because the cahe doesn't guarantee much on access Perhaps some convenience wrappers would make this look nicer(with inline) shockrah 2021-04-14 22:44:57 -0700
  • 39ae3ba6be Adding example of websocket url shockrah 2021-04-14 22:39:06 -0700
  • 0b0bcd5de6 First pass docs for rtc capabilities shockrah 2021-04-14 22:38:43 -0700
  • 42d6a77050 - Removing network control from the cache From this point forward the cache should basically just be a data container. Methods on the cache object are there for convenience and should only ever return very simple data [booleans, integers, () etc.]. The cache should also have very litter/no concept of commands to decouple it from the renderer process. ! list_channels is still implemented in the cache however it remaains a vestige and will be moved to the net module shockrah 2021-04-11 17:39:54 -0700
  • 3708d2cd08 Removing websocket changes as they don't architecturally work and thus require too many workarounds A better architecture must be implemented to have good websocket support shockrah 2021-04-10 16:56:52 -0700
  • 102c3b2a10 Electron on Linux hangs when making two successive async calls over the network Without this calls to /channels/list would break after the first API hit shockrah 2021-04-10 16:54:41 -0700
  • 72f3461341 ! Due to user-id's being randomly generated it is now much more likely that id's can't be parsed by javascript properly Json-bigint should help alleviate this issue by correctly parsing numbers for us shockrah 2021-04-10 16:47:40 -0700
  • 89bd257213 * More explicit query string guard in /channels/list endpoint handler * rtc::make_url now builds websocket urls more robustly incase we have to percent encode them shockrah 2021-04-10 16:45:13 -0700
  • 283c201e96 * More explicit query string guard in /channels/list endpoint handler * rtc::make_url now builds websocket urls more robustly incase we have to percent encode them shockrah 2021-04-10 16:44:24 -0700
  • f92ced1241 + Websocket setup is almost proper but it completely hangs after we start listening for connections Of course this is an issue because we can no longer get data from the user A full rearchitecting may be in order here however its not impossible to modify the current architecture so far shockrah 2021-04-09 22:10:08 -0700
  • a0b8e82000 Adding tungstenite for async websocket support shockrah 2021-04-09 21:55:31 -0700
  • abd2537918 really simple debugger logger, will remove at some point but it has use right now shockrah 2021-04-09 21:55:04 -0700
  • bdd4a63a8d * Fixing url construction for websockets shockrah 2021-04-09 21:52:57 -0700
  • 5df5329b6c * Fixed authentication parameter parsing for both users and servers * Jwt is now given over the query string as many websocket libraries make it hard to pass header parameters Parsing these values should also work fine but we'll see in time shockrah 2021-04-09 18:59:10 -0700
  • 7eb81f38f2 * Fixing bad /message/send route callback Issue was that we weren't sending the correct headers/body data(ya I know) shockrah 2021-04-08 21:21:56 -0700
  • 6088b0836f + Send message callback now implemented + channel switcher works as well, although it relies on /lc being ran prior to its invocation shockrah 2021-04-08 15:45:20 -0700
  • 9ad963f097 + Adding POST handler for message sending /message/send Working as intended shockrah 2021-04-08 15:34:46 -0700
  • fe448d07d4 Better naming scheme for when we start requesting voice channels after this shockrah 2021-04-07 22:17:28 -0700
  • ceabc73cf7 Fixed hanging json-api issue with dev-run script shockrah 2021-04-07 21:06:46 -0700
  • 368c9bc95f + Better logging in main + shockrah 2021-04-07 21:06:08 -0700
  • d030accddc * Adding id to insertion call in db-lib::channel::add This is done at the driver level because the member id's are randomly generated u64's shockrah 2021-04-07 20:48:58 -0700
  • 86cd551309 Adding option to build release version of tui shockrah 2021-04-07 20:42:30 -0700
  • 31dd85d8f0 simple make file to avoid repeatng args all the time shockrah 2021-04-07 20:41:54 -0700
  • 704f372c3e + Adding list_channel handler More agressive channel caching may be required here but it works as an MVP for now shockrah 2021-04-07 20:38:06 -0700
  • 8be5547d9e fixed channel api type shockrah 2021-04-07 20:24:31 -0700
  • 10e8b7331f + Login route added to net module ! No wrapper goes around this module to avoid fragmentation Note that basically every network hit is built around try's so they'll all return HttpResult<T>'s shockrah 2021-04-05 17:41:28 -0700
  • adea888b21 - Removing fluff from config structure shockrah 2021-04-05 17:37:43 -0700
  • 0bee002164 + List channels backbone in place Technically everything is there but I haven't really tested anything yet Will 100% need fixing + optimizing shockrah 2021-04-05 17:36:24 -0700
  • 5ab2c961f6 - Adding listhost + listchan command variants shockrah 2021-04-05 17:00:59 -0700
  • 939ee8c73f + Ignoring empty lines + Only adding / on '/' input activation shockrah 2021-04-05 16:54:27 -0700
  • a8d4ca9028 Removing blocking client from reqwest dep as its not needed shockrah 2021-04-05 16:53:19 -0700
  • 0bb7c5f49b adding / to start commands now shockrah 2021-04-05 14:24:21 -0700
  • 3c10d342eb - Removing dead_code attr from TEXT_CHANNEL + Adding Clone derivation to Channel struct shockrah 2021-04-04 17:36:58 -0700
  • a098121ab8 * Messages now grow from the top to the bottom(new messages ontop) + Option to enable/disable message-box borders shockrah 2021-04-04 14:17:39 -0700
  • 6fff48cfab * Messages now grow from the top to the bottom(new messages ontop) + Option to enable/disable message-box borders * Switching over to using bold! macro where applicable This change mostly reduces the eyesoreness of the termion code shockrah 2021-04-04 14:16:54 -0700
  • 43e3f93aad + Handful of useful macros/functions that are used basically everywhere ! There's no real order to these as they are mostly miscellaneous shockrah 2021-04-04 14:15:06 -0700
  • 1c85c88f96 * Normalized cache data structures a bit * Also changed up the naming scheme to be more clear * Config -> ConfigFile - Removed ConfigFile::server_url method ! The ConfigFile struct is now pretty much entirely used for disk operations * update_jwt method also take in correct parameters shockrah 2021-04-04 14:13:37 -0700
  • 3f1dfbf824 Adding rtc notifications to relevant endpoints ! Still need a feature flag to compile this optionally instead of all the time - Removed warning in main's auth::login_get_jwt call shockrah 2021-04-02 13:56:44 -0700
  • be54ce6a57 - Removing Claim::new since its used once + New notify driver function which does the network magic we need + Adding event emitters for the following events "delete-channel" "create-channel" "update-nick" shockrah 2021-04-02 13:55:21 -0700
  • 17f281c91c Removing websocket library for tokio-tungstenite (rtc) shockrah 2021-04-02 12:29:53 -0700
  • e496fbdd1a Message event now asynchonously emitted from /message/send to rtc server shockrah 2021-04-02 12:11:59 -0700
  • c6a49a8437 User JWT's now have nbf field in claims set in seconds shockrah 2021-04-02 12:06:17 -0700
  • 715f334619 - Removing peers module for simplicity and reduction of data complexity Basically the peer map system that we had before isn't going to work simply because succesful client connections already have the data we need inside them. Adding a whole wrapper around this just complicates things in a way that doesn't really give any benefit. shockrah 2021-04-01 17:21:57 -0700
  • d8171f8b03 + Replacing rust microservice with more lenient js built server The JSON-API can't _really_ use regular http requests because this server then has to do a lot of multi-threading nonsense. For the sake of simplicity for myself and others that try to write their own FC compliant servers: the rtc server(for now) only takes in websocket requests, and attemptes to discern servers from users connections for event handling shockrah 2021-04-01 11:41:51 -0700
  • afdeef0a49 More warning removals and more db-lib result wrapping This should be everything now shockrah 2021-03-30 23:00:50 -0700
  • 4615374357 Comfy dev scripts to make life a little bit easier shockrah 2021-03-30 22:49:46 -0700
  • 498da4c899 Updating dependancies to latest versions and removing some fluff interim libs shockrah 2021-03-30 22:49:20 -0700
  • c45f8d0482 More db-lib ok/err wrapping Some misc changes that don't really belong with anything else are bundled here Those changes aren't actually very important however shockrah 2021-03-30 22:46:59 -0700
  • 75dcb7b73e No more jwt db checks Also wrapping relevant db code with ok/err checks shockrah 2021-03-30 22:45:39 -0700
  • 41202507c1 removing warning shockrah 2021-03-30 22:44:09 -0700
  • 4cbbfdd7a2 mysql_async updates * More shorthand usage for clearer code in invite create shockrah 2021-03-30 22:43:07 -0700
  • 54f4dd53be - Removing non-result returns + Updating further for newest version of mysql_async shockrah 2021-03-30 22:42:34 -0700
  • fea94bffa0 Removing features flag from db-lib as its not needed shockrah 2021-03-30 21:41:57 -0700
  • 15b56353b8 Removing passthrough for message send handler This means we get more opaque errors for the clients but it also results in way less code to maintain shockrah 2021-03-30 21:39:44 -0700
  • d88948385d Upgrading mysql_async to latest version This version comes with the benefit of having much more concise exec_map functionality among other things shockrah 2021-03-30 21:38:16 -0700
  • f7d90e4a09 - Removal of auth code in db-lib shockrah 2021-03-30 21:36:21 -0700
  • 8eec9abd74 + More dev files shockrah 2021-03-30 12:25:34 -0700
  • 56e4e22b4c + JWT Authentication * Server JWT's and Client JWT's built with seperate signature types shockrah 2021-03-30 12:24:10 -0700
  • 5bbc57313f + Json-API now pushes proper new-message event to rtc server correctly + Rtc server takes in new-message correctly but with basically no ux/auth for now This should be fine as we can layer on security afterwards with no issue shockrah 2021-03-25 20:46:10 -0700
  • 291505201b removng fluff and adding link to repo shockrah 2021-03-24 15:19:43 -0700
  • 52fab01119 + Clearer logging from the json api * Renamed db helper function to be (debatably) more clear in its intentions That function and everything in that module is quickly become awful however shockrah 2021-03-24 01:43:52 -0700
  • a1f86fdf6e * Moving away from auto_increment ! Initial id size will stay as u64 but u128 are easily the next major change This change shouldn't break clients written in high level languages since most already use 128's under the hood anyway - This commit also removes the auto_increment flag from basically everything that uses RNG id's shockrah 2021-03-24 01:14:37 -0700
  • d02084a22c + Adding proper file upload support ! Requirements for variable message fetching not yet met ! /message/get?id=<id> needs a way of passing back file contents ! The file upload is sketchy at best and not necessarily guaranteed to sync the database with the file system shockrah 2021-03-23 17:16:05 -0700
  • 92dc4d888f meta tags and favicon shockrah 2021-03-22 22:39:51 -0700
  • 185b64d9db Base version of the rtc server Authorization is required for implementation So is a proper messaging model to make implementation clean and scalable For now this serves as a good starting point for the rest of this project shockrah 2021-03-22 02:45:54 -0700
  • 3ee22ff932 - Removed remaining mentions of joindate shockrah 2021-03-20 22:54:00 -0700
  • 975acfd606 Backend REST API changes: shockrah 2021-03-20 22:40:07 -0700
  • 03c41b6833 - Removed joindate from members schema + Auth module now uses std::time for time based calculations ! All time notations are i64 and rounded to the Millisecond shockrah 2021-03-20 19:47:59 -0700
  • 8812ff7198 + text/plain Message sending works now + More skeleton code for the caching system shockrah 2021-03-20 19:35:38 -0700
  • 530d287431 Merge branch 'master' of gitlab.com:shockrah/freechat shockrah 2021-03-20 15:00:58 -0700
  • 939042a4c5 skeleton code ready to start pluggin in async fetch calls to remote servers Some model still has to be built to put RTC somewhere Also stdout still requires async handling shockrah 2021-03-20 15:00:49 -0700
  • 988aa9f155 Removal of chrono and async_trait as dependancy in db-lib Removig chrono from api code as well shockrah 2021-03-20 13:56:02 -0700
  • ba14600b34 Removal of chrono and async_trait as dependancy in db-lib Removig chrono from api code as well shockrah 2021-03-20 13:56:02 -0700
  • cb5975f235 FULL REWORK AND PORT TO TERMION shockrah 2021-03-17 20:39:42 -0700
  • c3d5c75cc0 messages rebind now work properly and sends message correctly, Message constructor no longer incorrectly check message type shockrah 2021-03-12 23:16:06 -0800
  • c667f69d0e Fixing busted config adder thingy shockrah 2021-03-12 21:36:44 -0800
  • 67575cda53 adding tsc to make build shockrah 2021-03-12 02:20:33 -0800
  • 5b2e92da06 Caching is still being designed but it _will_ be written in typescript to a more well docc'ed api for everything else shockrah 2021-03-12 02:20:00 -0800
  • 9ce04e96a7 Query string parameter 'type' is now enforced by the api + Flag is literally called 'type' shockrah 2021-03-12 02:17:06 -0800
  • dc117ba02f Moving message type to types.ts shockrah 2021-03-11 17:22:22 -0800
  • d620d3cc61 New types module written with typescript to slowly start migrating code over to typescript shockrah 2021-03-11 17:22:05 -0800
  • 049e8aea82 Misc fixes - I've no idea how to describe these but they're really not that important shockrah 2021-03-11 17:20:13 -0800
  • e4f6e71ac8 ! Fixing message box to look decent - Moving Initialization code into src/init.js shockrah 2021-03-11 17:18:26 -0800
  • b5822cd3f1 Moving as much auth/initialization logic out of index.html New local push function in auth for push server buttons onto the dom shockrah 2021-03-09 15:36:55 -0800
  • 911edd8114 Supporting content_type flag in messages properly now shockrah 2021-03-09 00:11:34 -0800
  • 2fa1ec6f34 Async rewrite of entire module ! Channels list now fully asynchronous html pusher is now its own function for cleanness New ANY_CHANNEL integer is supported by the backend for requesting all channels in one go instead of voice|text Removed more callback hell code JSDocs updated to reflect their respective function signatures shockrah 2021-03-09 00:10:59 -0800
  • 7fede3b4e1 New css making channel buttons not ugly as hell Moving channels.list behind async call Moved server-name to top of dom to reduce clutter(i think) shockrah 2021-03-09 00:07:41 -0800