feat: introduce webxdc appSenderAddr and canOnlySendUpdatesToAppSender#136
feat: introduce webxdc appSenderAddr and canOnlySendUpdatesToAppSender#136
Conversation
This allows apps to behave differently, dependeing on the sending context.
|
core implementation at chatmail/core#8133 |
|
discussed with @hpk42 more and we think it makes sense to change to: this makes sure to not introduce a "broadcast" term to the spec of webxdc because in the context of w2g.tv this same concept of "only the app sender can send updates" might be called "host" instead. Note that we need to amend the spec for |
|
So what would |
|
It would mean that you can only send to sender, this can be clarified in the documentation. If you mean you want to keep open the option to send updates only to a subset of peers I'd suggest but that complicates the proposed api quite a bit. |
i.e. renaming and amending sendUpdate docs etc.
|
i adapted chatmail/core#8133 which is ready for review now |
|
|
||
| `canOnlySendUpdatesToAppSender` is a boolean that is `true` if updates sent | ||
| by the local user will only be seen by the app sender. | ||
| If it is `false` or `undefined`, the local user can send [updates](./sendUpdate.md) to everyone in the chat. |
There was a problem hiding this comment.
it is false also for one-to-one chats, maybe worth to say that explicit.
if true, question pops up if SELF is seeing the update - there are few situations where SELF do not get updates already today, eg. if one cannot sent in a chat, on chat requests. as the state comes from the channel owner only, it might be better here as well. but not sure, just mentioning
There was a problem hiding this comment.
I assumed that
All receiving peers, including the sending one, will receive the update
in sendUpdate.md implied that you get your own updates even if you are not sender, maybe I was wrong in my review on the core PR
|
with the latest changes, we destroyed the initial idea of knowing if one is on a broadcast or not.
tbh, with all the added complexity, i am sceptical if the recent changes were improvements. also, the calculation of sender is not simple, and has cornercases, where it is undefined. it will also be harder for xmpp, and other hosts. all solvable, sure, but i am afraid we're adding complexity here, that has limited use at the end, and needs to be maintained for a long time. alone by the not obvious pitfalls, it is questionable. maybe better do sender context in another discussion, there is the idea of putting that outside payload etc. we're often saying, that we want to be on point, but that seems not the case here. i am suggesting to revert to the initial idea |
|
closing this in favor in of #137 |
This allows apps to behave differently, depending on the sending context.
A corresponding PR to make it available in Delta Chat is in
chatmail/core#8133
The spec change should not be merged before it is successfully released, and can be used a bit in practise.