first of all, I have renamed the room.clj file to channel.clj for more accuracy and also because I assume that the new naming scheme will be based on channel from now on.
I have also extended the Adapter protocol by introducing a new channels function which (should be)/is nothing more than alias to the existing rooms function and whose implementation should just point to the existing rooms function implementation, for any record implementing the Adapter protocol.
I have also renamed multiple auxiliary functions whose names were related to room to instead use the word channel. Same thing for the docstrings. These are more cosmetic changes and were not necessarily important in order to have the project running. But for more accuracy within the codebase, it is nicer to have the same naming scheme used (almost) everywhere.
I have said almost everywhere in the previous sentence because of course we can not change everything containing the word room within it and especially the underlying data model related to rooms.
Therefore, a little hint for the review ^^ :
there should not be changes related to room command data model extraction/destructuring in this PR. So things like the following should remain unchanged :
[{:keys [adapter room] :as chat-source} ts]
otherwise, we can get into trouble and you should let me know if you find such changes so I can fix it ;-)
Now, here is how it renders so far :
New channel command in action
The room command (maintained for compatibility)
feel free to play around with this branch guys and as usual, do not hesitate to let me know if you find any issue related to the changes introduced.
hey guys,
here is the PR related to https://github.com/yetibot/yetibot/issues/799 : Renaming the room command to channel :-)
So what do we have here :
first of all, I have renamed the
room.clj
file tochannel.clj
for more accuracy and also because I assume that the new naming scheme will be based on channel from now on.I have also extended the
Adapter
protocol by introducing a newchannels
function which (should be)/is nothing more than alias to the existingrooms
function and whose implementation should just point to the existingrooms
function implementation, for any record implementing theAdapter
protocol.I have also renamed multiple auxiliary functions whose names were related to room to instead use the word channel. Same thing for the docstrings. These are more cosmetic changes and were not necessarily important in order to have the project running. But for more accuracy within the codebase, it is nicer to have the same naming scheme used (almost) everywhere.
I have said almost everywhere in the previous sentence because of course we can not change everything containing the word room within it and especially the underlying data model related to rooms.
Therefore, a little hint for the review ^^ :
otherwise, we can get into trouble and you should let me know if you find such changes so I can fix it ;-)
Now, here is how it renders so far :
New channel command in action
The room command (maintained for compatibility)
feel free to play around with this branch guys and as usual, do not hesitate to let me know if you find any issue related to the changes introduced.
thanks \o