Open holmesal opened 10 years ago
Actually, I'm thinking about inverting that mentions object, so the keys are the uids and the values are the strings used to refer to them. It definitely makes it a little easier to filter when deciding whether to send a push notification.
So it would look like this:
{
"type": String,
"content": Dictionary,
"owner": String,
"mentions": {
"facebook:1234567890": "Matthew",
"facebook:9478463873": "Dan A."
},
".priority": Unix time in milliseconds
}
Updated based on convo today:
{
"type": String,
"content": Dictionary,
"owner": String,
"mentions": [
{
"substring": String,
"uuid": String
}
],
".priority": Unix time in milliseconds
}
Implemented on android. Substring may either be @Username or @FirstnameLastname, I am not sure yet!
So messages currently look like this:
I propose we add a "mentions" property on the top level, which contains a key-value mapping of the users mentioned. Key should be the string name used in the @mention, and value should be the uid of the user it maps to.
It would look like this in a message:
What say you @DogsForArms?
@matthewkulp what do you think about different ways to @mention by name? For example, @alex (if there is only one alex), @AlexW or @Alex W. if there are two, etc?