LOC-16: Add "verb" to message payload



Issue Information

Issue Type: Improvement
 
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: LocalChat (LOC)
Resolution: Done (2018-05-15 09:17:32)
Target version: V0.0.2,
Components: Client , Server ,

Created: 2018-05-14 09:14:18
Time Spent Working


Description
Currently, the message payload sent to sendMsg is a JSON string with a single attribue - text

I want to add a new attribute verb. The default value will be say which indicates a standard message.

With this in place, we can then add functionality into the client like being able to enter /me hides and have Ben hides printed in the group as an action rather than as something someone's said (maybe do as the verb?).

It also means that messages from SYSTEM will be able to assign severities to messages it pushes into a group ( info,warn,error etc) so that the client can colour/highlight them appropriately.


Issue Links

Toggle State Changes

Activity


Repo: LocalChat
Host:Rimmer

commit 77c6c401111142be4e05a7d7fef2547b39c91df0
Author: B Tasker <github@<Domain Hidden>>
Date: Tue May 15 08:56:58 2018 +0100

Commit Message: LOC-16 add "verb" to message payload

It's not currently used by the client (and probably won't be until there's a need for it), but it's now available.

The default is 'say', and when sending a system message the server will use 'sysinfo'

client/LocalChatClient.py | 5 +++--
server/LocalChat.py | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)


View Commit | View Changes
Repo: LocalChat
Host:Rimmer

commit 5cdcab90ede4ba2d75829bf1a9bff9a2f2f0768c
Author: B Tasker <github@<Domain Hidden>>
Date: Tue May 15 09:06:07 2018 +0100

Commit Message: Adding /me functionality using verb from LOC-16

Within a room, if a user types (for example)

/me returns again

The room will see a (yellow) message reading

* ben2 returns again *

client/LocalChatClient.py | 31 ++++++++++++++++++++++++-------
1 files changed, 24 insertions(+), 7 deletions(-)


View Commit | View Changes
Repo: LocalChat
Host:Rimmer

commit c223367ea17f40fa33b91a418f7ddbd3f4486002
Author: B Tasker <github@<Domain Hidden>>
Date: Tue May 15 09:14:11 2018 +0100

Commit Message: Used LOC-16 verb to assign colours to different system messages

System will set one of the following verbs along with it's messages, resulting in a different colour in the client

- sysinfo - magenta (as before)
- syswarn - Cyan
- sysalert - High contract reversed colours (grey background, black font)

client/LocalChatClient.py | 5 +++++
server/LocalChat.py | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)


View Commit | View Changes
There are now 2 uses of verb within the client (other than say) - one for actions (i.e. /me) and one for system level messages.

Verbs currently implemented are

- say
- do
- sysinfo
- syswarn
- sysalert

The sys* verbs will only be honoured if the sending user was SYSTEM otherwise they'll be ignored and it'll be treated as a say message
btasker changed status from 'Open' to 'Resolved'
btasker added 'Done' to resolution
btasker changed status from 'Resolved' to 'Closed'