LOC-29 Fix NO_RECP exception when calling gpg.encrypt on Debian9
LOC-29 Fix NO_RECP exception when calling gpg.encrypt on Debian9

file:a/README.md -> file:b/README.md
--- a/README.md
+++ b/README.md
@@ -12,6 +12,11 @@
 The provided client uses basic End To End encryption (currently using PGP as the encryption mechanism), and the server holds encrypted payloads in memory only (to ensure the ciphertext doesn't end up captured on the hosting provider's SAN for a time). Message payloads are purged after a short interval to help reduce the potential exposure were someone to be monitoring the server's memory.
 
 The default behaviour is a Multi-User Chat (MUC), however direct messaging between participants within a room is also supported.
+
+
+## Project Management
+
+Planned features, bugfixes etc can all be viewed at [project.bentasker.co.uk](https://projects.bentasker.co.uk/jira_projects/browse/LOC.html). Release notes are at [bentasker.co.uk](https://www.bentasker.co.uk/documentation/release-notes/91-localchat)
 
 
 

--- /dev/null
+++ b/ansible/group_vars/localchat-servers.yml
@@ -1,1 +1,2 @@
+ansible_user: ansible
 

--- /dev/null
+++ b/ansible/inventory/hosts
@@ -1,1 +1,4 @@
+[localchat-servers]
+192.168.7.253
 
+

--- /dev/null
+++ b/ansible/locaLchat.service
@@ -1,1 +1,15 @@
+[Unit]
+Description=LocalChat
+After=multi-user.target
 
+[Service]
+WorkingDirectory=/usr/local/localchat
+Type=idle
+ExecStart=/usr/bin/python LocalChat.py
+Restart=always
+RestartSec=3
+
+[Install]
+WantedBy=multi-user.target
+
+

--- /dev/null
+++ b/ansible/localchat-servers.yml
@@ -1,1 +1,7 @@
+---
 
+-   hosts: localchat-servers
+    roles:
+        - localchat-server
+
+

--- /dev/null
+++ b/ansible/roles/localchat-server/defaults/main.yml
@@ -1,1 +1,3 @@
+localchat_server_install_path: /usr/local/localchat
 
+

--- /dev/null
+++ b/ansible/roles/localchat-server/handlers/main.yml
@@ -1,1 +1,15 @@
+---
 
+# Handlers
+
+
+
+- name: Start service
+  # See above.
+  command: systemctl start localchat.service
+  become: true
+
+- name: reload systemd
+  command: systemctl daemon-reload
+  become: true
+

--- /dev/null
+++ b/ansible/roles/localchat-server/tasks/main.yml
@@ -1,1 +1,26 @@
+---
 
+- name: Install Dependancies
+  apt: name={{item}} state=installed
+  with_items:
+    - python-flask
+    - python-urllib3
+    - python-sqlite
+    - python-bcrypt
+    - python-gnupg
+  become: true
+  tags: deps
+    
+
+    
+    
+    
+    
+    
+-   name: Create Unit File
+    template: src=localchat.service dest=/etc/systemd/system/localchat.service
+    notify: reload systemd
+    become: true
+
+    
+

--- /dev/null
+++ b/ansible/roles/localchat-server/templates/localchat.service
@@ -1,1 +1,14 @@
+[Unit]
+Description=LocalChat
+After=multi-user.target
 
+[Service]
+WorkingDirectory={{localchat_server_install_path}}
+Type=idle
+ExecStart=/usr/bin/python LocalChat.py
+Restart=always
+RestartSec=3
+
+[Install]
+WantedBy=multi-user.target
+

file:b/ansible/site.yml (new)
--- /dev/null
+++ b/ansible/site.yml
@@ -1,1 +1,2 @@
+- include: localchat-servers.yml
 

--- a/server/LocalChat.py
+++ b/server/LocalChat.py
@@ -758,7 +758,7 @@
         
         '''
 
-        crypted = self.gpg.encrypt(msg,None,passphrase=self.syskey,symmetric="AES256",armor=False)
+        crypted = self.gpg.encrypt(msg,None,passphrase=self.syskey,symmetric="AES256",armor=False,encrypt=False)
         return crypted.data.encode('base64')