The general understanding is this. Nothing prevents you from doing this. But the Observer pattern is a mechanism and not a business rule like you used. Showing a code would give you a better idea.
In fact the Observer pattern implements just events, but not this type of event you're talking about, not social events but computer events.
In the way you created, who are the subscribers? Real people you have no control at all? This does not seem to me to be the default Observer. In this pattern subscribers are often other parts of the application that need to be notified. In general, it is a design pattern created for object-oriented use.
Examples:
- A file has been modified in the file system
- A price property has been modified in a product class
- A click was clicked
- Received a network information
- A visual object of the game encountered another object (hit the target)
- An update to the database occurred
If we can transport the Observer concept from the computer out of it I do not know. What you are doing is something like the defined pattern but it seems to me a variant that does not fit the formal definition of the pattern. It looks more like an observer-like .
You can use whatever logic you want to achieve your goal. What I can say is that if you are worried whether you are implementing a design pattern or not, you are in the wrong concern.
Design patterns depend on implementation, you can achieve your goal in other ways (probably worse) where a design pattern would fit.
Source: Wikipedia
In this diagram, who are your notify()
? The emails of the participants as you called? Sounds strange to me. I think the default was not created for this.
In the background what does it matter whether you are using the pattern or not? Is your implementation doing everything it should do properly and efficiently?