Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

Apply common structure to return value in relayMessages #5

Closed

Conversation

lomchik
Copy link

@lomchik lomchik commented Aug 6, 2018

Problem: When relayMessages process message with kind = 'file' structure of returned message differs from usual (missed fields 'fromTag', 'from', 'kind', 'time').
Solution adds required fields and move specific 'file message' data to field msg.
Now each returned message will have same structure:

{
"fromTag": "string",
"from": "string",
"kind": "type of message",
"nonce": "string",
"time": 12312312,
"msg": "{object specific to given 'kind'}"
}

When relayMessages process message with kind = 'file' structure of returned message differs from usual (missed fields 'fromTag', 'from', 'kind', 'time'). This solution add required fields and move specific to  'file message' data to  field msg.
Now each message on returned message will have same structure:

{
fromTag,
from,
kind: 'type of message',
nonce,
time,
msg: {object specific to given 'kind'}
}
@lomchik lomchik requested review from lord-max and pavlo-liapin and removed request for lord-max and pavlo-liapin August 6, 2018 08:41
@lomchik lomchik closed this Aug 6, 2018
@lomchik lomchik deleted the common-interface-for-file-message-returned-data branch August 6, 2018 16:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant