anchor.diff:      end.
   
   
  -publish_core(From, Channel, Nonce, Auth, MsgNonce, Msg)->
  +publish_core(From, Channel, Nonce, Auth, Msg)->
       FromPK = hex:hexstr_to_bin(From),
       {ok, ServerSK} = keys:getServerSKBin(),
       {ok, ChannelName} = salt:crypto_box_open(hex:hexstr_to_bin(Auth), list_to_binary(Nonce), FromPK, ServerSK),
       case list_to_binary(Channel) =:= ChannelName of
           true ->
               ChannelId = From ++ "." ++ Channel,
  -            Message = ?JSON(jsonMessage(Msg, MsgNonce)),
  +            Message = ?JSON(jsonMessage(Msg)),
               pubsub:notify(ChannelId, Message),
               true;
           false ->
  
positive.code:     Channel = ?GETVALUE("channel", QS),
      Nonce = ?GETVALUE("nonce", QS),
      Auth = ?GETVALUE("auth", QS),
      MsgNonce = ?GETVALUE("msg_nonce", QS),
      Msg = ?GETVALUE("msg", QS),
      case publish_core(From, Channel, Nonce, Auth, MsgNonce, Msg) of
          true ->
              ?HTTP_OK(Req);
          false ->
  
negative.code:     pubsub:notify(Pubkey, Message),
      ?HTTP_OK(Req).
  
  jsonMessage(Message)->
      {struct,
       [
              {"type", ?U("Message")},
              {"body", ?U(Message)}
              ]}.
  
  