summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-11-08 19:07:34 +0100
committernsensfel <SpamShield0@noot-noot.org>2018-11-08 19:07:34 +0100
commit212ac342a31c5c6e0e6152d3ed3a74b1e28b6755 (patch)
treecd38c6f379677db6390fe765a07ae8e5252f9a44
parentdcf39aedd1cedd1d29d6765225841bf906bc3677 (diff)
Trying to send roster updates to the server.
It appears to only send an empty JSON message, though...
-rw-r--r--src/roster-editor/src/Comm/UpdateRoster.elm23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/roster-editor/src/Comm/UpdateRoster.elm b/src/roster-editor/src/Comm/UpdateRoster.elm
index fa58cb0..eabdd5e 100644
--- a/src/roster-editor/src/Comm/UpdateRoster.elm
+++ b/src/roster-editor/src/Comm/UpdateRoster.elm
@@ -26,14 +26,23 @@ import Struct.Model
try_encoding : Struct.Model.Type -> (Maybe Json.Encode.Value)
try_encoding model =
(Just
- (Json.Encode.list
- (List.map
- (Struct.Character.encode)
- (List.filter
- (Struct.Character.get_was_edited)
- (Array.toList model.characters)
+ (Json.Encode.object
+ [
+ ("stk", (Json.Encode.string model.session_token)),
+ ("pid", (Json.Encode.string model.player_id)),
+ (
+ "rst",
+ (Json.Encode.list
+ (List.map
+ (Struct.Character.encode)
+ (List.filter
+ (Struct.Character.get_was_edited)
+ (Array.toList model.characters)
+ )
+ )
+ )
)
- )
+ ]
)
)