cburschka / cadence

A strophe.js-powered XMPP web client for chatrooms.
6 stars 2 forks source link

Message (and notification) refactoring #419

Closed cburschka closed 8 years ago

cburschka commented 8 years ago

The "direct" message type is nasty. We're mixing xmpp message types (well defined: error, chat, groupchat, headline, normal) with our own types. Only non-xmpp messages should have a custom type (namely "local").

This requires some rewrite in the logic that depends on this message type, in the form of checking if the sender is a room occupant.

As a bonus, though, we no longer need a special case for announcements - these can be simply rendered as messages originating from a service JID of the "headline" type.