@@ -139,11 +139,19 @@ public function deleteReaction(string $messageId, string $reactionType, string $
139139
140140 /** Creates or returns an existing channel.
141141 * @link https://getstream.io/chat/docs/php/creating_channels/?language=php
142+ * @param string $userId The creating user id
143+ * @param array|null $members Optional list of member user ids
144+ * @param array|null $filterTags Optional list of filter tags to associate with the channel
142145 * @throws StreamException
143146 */
144- public function create (string $ userId , ?array $ members = null ): StreamResponse
147+ public function create (string $ userId , ?array $ members = null , ? array $ filterTags = null ): StreamResponse
145148 {
146149 $ this ->customData ['created_by ' ] = ["id " => $ userId ];
150+
151+ if ($ filterTags !== null ) {
152+ $ this ->customData ['filter_tags ' ] = $ filterTags ;
153+ }
154+
147155 $ response = $ this ->query ([
148156 "watch " => false ,
149157 "state " => false ,
@@ -685,4 +693,28 @@ public function getDraft(string $userId, ?string $parentId = null): StreamRespon
685693 }
686694 return $ this ->client ->get ($ this ->getUrl () . "/draft " , $ params );
687695 }
696+
697+ /** Adds filter tags to the channel.
698+ * @link https://getstream.io/chat/docs/php/channel_update/?language=php
699+ * @throws StreamException
700+ */
701+ public function addFilterTags (array $ tags ): StreamResponse
702+ {
703+ $ payload = [
704+ "add_filter_tags " => $ tags
705+ ];
706+ return $ this ->update (null , null , $ payload );
707+ }
708+
709+ /** Removes filter tags from the channel.
710+ * @link https://getstream.io/chat/docs/php/channel_update/?language=php
711+ * @throws StreamException
712+ */
713+ public function removeFilterTags (array $ tags ): StreamResponse
714+ {
715+ $ payload = [
716+ "remove_filter_tags " => $ tags
717+ ];
718+ return $ this ->update (null , null , $ payload );
719+ }
688720}
0 commit comments